test suite reviews and discussions
 help / color / mirror / Atom feed
From: Song Jiale <songx.jiale@intel.com>
To: dts@dpdk.org
Cc: Song Jiale <songx.jiale@intel.com>
Subject: [dts] [PATCH V1] tests/vxlan: optimize script
Date: Mon, 27 Mar 2023 11:06:32 +0000	[thread overview]
Message-ID: <20230327110632.735583-1-songx.jiale@intel.com> (raw)

only port 0 link state has been checked. it may occur that other port
link state is down, causing sending and receiving packets to fail.

Signed-off-by: Song Jiale <songx.jiale@intel.com>
---
 tests/TestSuite_vxlan.py | 20 ++++++++++----------
 1 file changed, 10 insertions(+), 10 deletions(-)

diff --git a/tests/TestSuite_vxlan.py b/tests/TestSuite_vxlan.py
index 1bf12743..98d6e666 100644
--- a/tests/TestSuite_vxlan.py
+++ b/tests/TestSuite_vxlan.py
@@ -553,7 +553,7 @@ class TestVxlan(TestCase):
         config.outer_mac_dst = self.dut_port_mac
         config.create_pcap()
         self.dut.send_expect("start", "testpmd>", 10)
-        self.pmdout.wait_link_status_up(self.dut_port)
+        self.pmdout.wait_link_status_up("all")
         config.send_pcap(self.tester_iface)
         # check whether detect vxlan type
         out = self.dut.get_session_output(timeout=2)
@@ -615,7 +615,7 @@ class TestVxlan(TestCase):
         config.outer_mac_dst = self.dut_port_mac
         config.create_pcap()
 
-        self.pmdout.wait_link_status_up(self.dut_port)
+        self.pmdout.wait_link_status_up("all")
         # save the capture packet into pcap format
         inst = self.tester.tcpdump_sniff_packets(self.recv_iface)
         config.send_pcap(self.tester_iface)
@@ -660,7 +660,7 @@ class TestVxlan(TestCase):
         # send vxlan packet
         config.create_pcap()
         self.dut.send_expect("start", "testpmd>", 10)
-        self.pmdout.wait_link_status_up(self.dut_port)
+        self.pmdout.wait_link_status_up("all")
         config.send_pcap(self.tester_iface)
         out = self.dut.get_session_output(timeout=2)
         print(out)
@@ -705,7 +705,7 @@ class TestVxlan(TestCase):
         self.dut.send_expect("set verbose 1", "testpmd>", 10)
         self.enable_vxlan(self.dut_port)
         self.enable_vxlan(self.recv_port)
-        self.pmdout.wait_link_status_up(self.dut_port)
+        self.pmdout.wait_link_status_up("all")
         # check normal packet
         self.send_and_detect(outer_udp_dst=1234)
         # check vxlan + UDP inner packet
@@ -749,7 +749,7 @@ class TestVxlan(TestCase):
         self.dut.send_expect("set verbose 1", "testpmd>", 10)
         self.enable_vxlan(self.dut_port)
         self.enable_vxlan(self.recv_port)
-        self.pmdout.wait_link_status_up(self.dut_port)
+        self.pmdout.wait_link_status_up("all")
         # check normal ipv6 packet
         self.send_and_detect(
             outer_ip6_src="FE80:0:0:0:0:0:0:0",
@@ -811,7 +811,7 @@ class TestVxlan(TestCase):
 
         self.enable_vxlan(self.dut_port)
         self.enable_vxlan(self.recv_port)
-        self.pmdout.wait_link_status_up(self.dut_port)
+        self.pmdout.wait_link_status_up("all")
         # check normal packet + ip checksum invalid
         self.send_and_check(outer_ip_invalid=1, outer_udp_dst=1234)
         # check vxlan packet + inner ip checksum invalid
@@ -975,7 +975,7 @@ class TestVxlan(TestCase):
         self.dut.send_expect("set verbose 1", "testpmd>", 10)
         self.enable_vxlan(self.dut_port)
         self.enable_vxlan(self.recv_port)
-        self.pmdout.wait_link_status_up(self.dut_port)
+        self.pmdout.wait_link_status_up("all")
         config = VxlanTestConfig(self)
         config_vlan = VxlanTestConfig(self, inner_vlan=1)
         config.outer_mac_dst = self.dut_port_mac
@@ -1055,7 +1055,7 @@ class TestVxlan(TestCase):
 
         self.enable_vxlan(self.dut_port)
         self.enable_vxlan(self.recv_port)
-        self.pmdout.wait_link_status_up(self.dut_port)
+        self.pmdout.wait_link_status_up("all")
         rule = (
             "flow create {} ingress pattern eth / ipv4 / udp / vxlan vni is {} / eth dst is {} / end actions pf "
             "/ queue index {} / end".format(
@@ -1234,7 +1234,7 @@ class TestVxlan(TestCase):
 
             self.dut.send_expect("set fwd io", "testpmd>", 10)
             self.dut.send_expect("start", "testpmd>", 10)
-            self.pmdout.wait_link_status_up(self.dut_port)
+            self.pmdout.wait_link_status_up("all")
             if BIDIRECT:
                 wirespeed = self.wirespeed(self.nic, PACKET_LEN, 2)
             else:
@@ -1328,7 +1328,7 @@ class TestVxlan(TestCase):
             self.dut.send_expect("set fwd csum", "testpmd>", 10)
             self.enable_vxlan(self.dut_port)
             self.enable_vxlan(self.recv_port)
-            self.pmdout.wait_link_status_up(self.dut_port)
+            self.pmdout.wait_link_status_up("all")
 
             # redirect flow to another queue by tunnel filter
             rule_config = {
-- 
2.25.1


             reply	other threads:[~2023-03-27  3:10 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-03-27 11:06 Song Jiale [this message]
2023-03-28  1:23 ` lijuan.tu

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=20230327110632.735583-1-songx.jiale@intel.com \
    --to=songx.jiale@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).