test suite reviews and discussions
 help / color / mirror / Atom feed
* [dts] [PATCH V1] tests: Optimize the send_and_check_packets function of cvl_switch_filter
@ 2020-07-19 22:02 Nannan Lu
  2020-07-24  2:30 ` Tu, Lijuan
  0 siblings, 1 reply; 2+ messages in thread
From: Nannan Lu @ 2020-07-19 22:02 UTC (permalink / raw)
  To: dts; +Cc: Nannan Lu

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@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


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [dts] [PATCH V1] tests: Optimize the send_and_check_packets function of cvl_switch_filter
  2020-07-19 22:02 [dts] [PATCH V1] tests: Optimize the send_and_check_packets function of cvl_switch_filter Nannan Lu
@ 2020-07-24  2:30 ` Tu, Lijuan
  0 siblings, 0 replies; 2+ messages in thread
From: Tu, Lijuan @ 2020-07-24  2:30 UTC (permalink / raw)
  To: Lu, Nannan, dts; +Cc: Lu, Nannan

Applied, thanks

> -----Original Message-----
> From: dts <dts-bounces@dpdk.org> On Behalf Of Nannan Lu
> Sent: 2020年7月20日 6:02
> To: dts@dpdk.org
> Cc: Lu, Nannan <nannan.lu@intel.com>
> Subject: [dts] [PATCH V1] tests: Optimize the send_and_check_packets function
> of cvl_switch_filter
> 
> 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@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


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2020-07-24  2:30 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-07-19 22:02 [dts] [PATCH V1] tests: Optimize the send_and_check_packets function of cvl_switch_filter Nannan Lu
2020-07-24  2:30 ` Tu, Lijuan

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).