[V1] tests/ip_pipeline: optimize scripts

Message ID 20220616071448.136874-1-songx.jiale@intel.com (mailing list archive)
State Accepted
Headers
Series [V1] tests/ip_pipeline: optimize scripts |

Checks

Context Check Description
ci/Intel-dts-suite-test warning SKIPPED

Commit Message

Jiale, SongX June 16, 2022, 7:14 a.m. UTC
  optimize 2 issue:
  1.the app should be closed after the case test, otherwise the
execution of other cases will be affected.
  2.sometimes the port link status changes slowly. need to ensure that
the port link status is up before sending the package.


Signed-off-by: Jiale Song <songx.jiale@intel.com>
---
 tests/TestSuite_ip_pipeline.py | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
  

Comments

Tu, Lijuan June 21, 2022, 6:54 a.m. UTC | #1
On Thu, 16 Jun 2022 15:14:48 +0800, Jiale Song <songx.jiale@intel.com> wrote:
> optimize 2 issue:
>   1.the app should be closed after the case test, otherwise the
> execution of other cases will be affected.
>   2.sometimes the port link status changes slowly. need to ensure that
> the port link status is up before sending the package.
> 
> 
> Signed-off-by: Jiale Song <songx.jiale@intel.com>


Applied, thanks
  

Patch

diff --git a/tests/TestSuite_ip_pipeline.py b/tests/TestSuite_ip_pipeline.py
index ab1637b5..be9c05b9 100644
--- a/tests/TestSuite_ip_pipeline.py
+++ b/tests/TestSuite_ip_pipeline.py
@@ -103,6 +103,8 @@  class TestIPPipeline(TestCase):
 
         self.tcpdump_start_sniff(rx_interface, filters)
 
+        # check that the link status of the port sending the packet is up
+        self.tester.is_interface_up(tx_interface)
         # Prepare the pkts to be sent
         self.tester.scapy_foreground()
         self.tester.scapy_append('pkt = rdpcap("%s")' % (pcap_file))
@@ -1036,7 +1038,8 @@  class TestIPPipeline(TestCase):
         """
         Run after each test case.
         """
-        pass
+        # close app
+        self.dut.send_expect("^C", "# ")
 
     def tear_down_all(self):
         """