[dts] [PATCH V1] tests/ip_pipeline: optimize scripts

Jiale Song songx.jiale at intel.com
Thu Jun 16 09:14:48 CEST 2022


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 at intel.com>
---
 tests/TestSuite_ip_pipeline.py | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

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):
         """
-- 
2.25.1



More information about the dts mailing list