[dts] [PATCH V2] tests/l3fwd_func: fix script

Jiale Song songx.jiale at intel.com
Tue May 17 09:48:59 CEST 2022


fix 2 issue:
  1.When DUT and tester ports are cross connected, the information of interconnection 
    ports cannot be obtained correctly.
  2.tcpdump timeout, increase the '-n' to skip the tcpdump reverse domain name 
    resolution operation.

Signed-off-by: Jiale Song <songx.jiale at intel.com>
---
 tests/TestSuite_l3fwd_func.py | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/tests/TestSuite_l3fwd_func.py b/tests/TestSuite_l3fwd_func.py
index 7340c09d..c2a3988b 100644
--- a/tests/TestSuite_l3fwd_func.py
+++ b/tests/TestSuite_l3fwd_func.py
@@ -49,7 +49,8 @@ class TestL3fwdFunc(TestCase):
         self.app_path = self.dut.build_dpdk_apps("examples/l3fwd")
         self.pkt = Packet()
         self.dport_info0 = self.dut.ports_info[self.dut_ports[0]]
-        self.tport_info0 = self.tester.ports_info[self.dut_ports[0]]
+        tport = self.tester.get_local_port(self.dut_ports[0])
+        self.tport_info0 = self.tester.ports_info[tport]
         self.tport_intf0 = self.tport_info0["intf"]
         # judgment is added to avoid errors caused by the absence of port 1
         if len(self.dut_ports) >= 2:
@@ -132,7 +133,7 @@ class TestL3fwdFunc(TestCase):
         :return:
         """
         out = self.tester.send_expect(
-            "tcpdump -r /tmp/tester/sniff_%s.pcap" % (self.tport_intf0),
+            "tcpdump -n -r /tmp/tester/sniff_%s.pcap" % (self.tport_intf0),
             "# ",
             timeout=30,
         )
-- 
2.17.1



More information about the dts mailing list