[dts] [PATCH V1] tests: Optimize the send_and_check_packets function of cvl_switch_filter
Nannan Lu
nannan.lu at intel.com
Mon Jul 20 00:02:24 CEST 2020
Optimize the send_and_check_packets function of TestSuite_cvl_switch_filter.py
to increase the speed of sending packets.
Signed-off-by: Nannan Lu <nannan.lu at intel.com>
---
tests/TestSuite_cvl_switch_filter.py | 12 ++++--------
1 file changed, 4 insertions(+), 8 deletions(-)
diff --git a/tests/TestSuite_cvl_switch_filter.py b/tests/TestSuite_cvl_switch_filter.py
index dc54fe7..01a2842 100644
--- a/tests/TestSuite_cvl_switch_filter.py
+++ b/tests/TestSuite_cvl_switch_filter.py
@@ -2559,17 +2559,13 @@ class SwitchFilterTest(TestCase):
"""
#Specify the port to use
dic["check_func"]["param"]["expect_port"] = port
-
self.dut.send_expect("start", "testpmd> ", 15)
time.sleep(2)
-
#send packets
- for per_packet in dic["scapy_str"]:
- pkt = Packet(pkt_str=per_packet)
- pkt.send_pkt(self.tester, tx_port=self.__tx_iface, count=1)
-
- out = self.dut.send_expect("stop", "testpmd> ")
-
+ self.pkt.update_pkt(dic["scapy_str"])
+ self.pkt.send_pkt(self.tester, tx_port=self.__tx_iface, count=1, timeout=370)
+ time.sleep(3)
+ out = self.dut.send_expect("stop", "testpmd> ", 15)
result_flag, log_msg = dic["check_func"]["func"](out, dic["check_func"]["param"], dic["expect_results"])
return result_flag, log_msg
--
2.25.1
More information about the dts
mailing list