test suite reviews and discussions
 help / color / mirror / Atom feed
From: Nannan Lu <nannan.lu@intel.com>
To: dts@dpdk.org
Cc: Nannan Lu <nannan.lu@intel.com>
Subject: [dts] [PATCH V1] tests: Optimize the send_and_check_packets function of cvl_switch_filter
Date: Sun, 19 Jul 2020 22:02:24 +0000	[thread overview]
Message-ID: <1595196144-360850-1-git-send-email-nannan.lu@intel.com> (raw)

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


             reply	other threads:[~2020-07-19 13:09 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-07-19 22:02 Nannan Lu [this message]
2020-07-24  2:30 ` Tu, Lijuan

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1595196144-360850-1-git-send-email-nannan.lu@intel.com \
    --to=nannan.lu@intel.com \
    --cc=dts@dpdk.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).