test suite reviews and discussions
 help / color / mirror / Atom feed
From: Wenjie Li <wenjiex.a.li@intel.com>
To: dts@dpdk.org
Cc: Wenjie Li <wenjiex.a.li@intel.com>
Subject: [dts] [PATCH V1] tests/flow_classify_softnic: optimize script
Date: Wed, 14 Aug 2019 18:16:30 +0000	[thread overview]
Message-ID: <1565806590-21199-1-git-send-email-wenjiex.a.li@intel.com> (raw)

optimize script:
1. verify the link is up before send packets
2. in test case inconsistent_rules, if the output of "flow create" does
not contain keyword "error", it will fail and return "timeout to flow 
create ...". This is not clear and would take more time to wait for the
timeout. Change it to self.verify("error" in out, "....").

Signed-off-by: Wenjie Li <wenjiex.a.li@intel.com>
---
 tests/TestSuite_flow_classify_softnic.py | 58 ++++++++++++++++++++++--
 1 file changed, 54 insertions(+), 4 deletions(-)

diff --git a/tests/TestSuite_flow_classify_softnic.py b/tests/TestSuite_flow_classify_softnic.py
index a649a44..d936df3 100644
--- a/tests/TestSuite_flow_classify_softnic.py
+++ b/tests/TestSuite_flow_classify_softnic.py
@@ -421,6 +421,8 @@ class TestFlowClassifySoftnic(TestCase):
         self.generate_rules(src_mask="255.192.0.0", src_spec="2.128.0.0", protomask=self.protomask, protospec=132, l4type="sctp", sportmask=self.portmask, dportmask=self.portmask, sportspec=100, dportspec=200, index=[1])
         self.generate_rules(dst_mask="255.192.0.0", dst_spec="4.0.0.0", protomask=self.protomask, sportspec=100, sportmask=self.portmask, dportmask=self.portmask, dportspec=200, index=[0])
         self.dut.send_expect("start", "testpmd> ", 60)
+        ret = self.pmdout.wait_link_status_up("all", 15)
+        self.verify(ret is True, "port link is down")
 
         # rule 0 test
         pcap_file = '/tmp/route_0.pcap'
@@ -522,6 +524,8 @@ class TestFlowClassifySoftnic(TestCase):
         self.generate_rules(src_mask=self.ipv4_mask, dst_mask=self.ipv4_mask, src_spec="100.0.0.3", dst_spec="200.0.0.3", protomask=self.protomask, protospec=132, l4type="sctp", sportmask=self.portmask, dportmask=self.portmask, sportspec=103, dportspec=203, index=[1])
         self.generate_rules(src_mask=self.ipv4_mask, dst_mask=self.ipv4_mask, src_spec="100.0.0.4", dst_spec="200.0.0.4", protomask=self.protomask, sportmask=self.portmask, dportmask=self.portmask, sportspec=104, dportspec=204, index=[0])
         self.dut.send_expect("start", "testpmd> ", 60)
+        ret = self.pmdout.wait_link_status_up("all", 15)
+        self.verify(ret is True, "port link is down")
 
         # rule 0 test
         pcap_file = '/tmp/route_0.pcap'
@@ -562,6 +566,8 @@ class TestFlowClassifySoftnic(TestCase):
         self.generate_rules(src_mask=self.ipv4_mask, src_spec="100.0.0.3", dst_spec="200.0.0.1", sportspec=100, dportspec=200, index=[1])
         self.generate_rules(src_mask=self.ipv4_mask, src_spec="100.0.0.4", dst_spec="200.0.0.1", sportspec=100, dportspec=200, index=[0])
         self.dut.send_expect("start", "testpmd> ", 60)
+        ret = self.pmdout.wait_link_status_up("all", 15)
+        self.verify(ret is True, "port link is down")
 
         # rule 0 test
         pcap_file = '/tmp/route_0.pcap'
@@ -595,6 +601,8 @@ class TestFlowClassifySoftnic(TestCase):
         self.generate_rules(dst_mask="255.255.255.0", src_spec="100.0.0.1", dst_spec="200.0.2.1", protospec=132, l4type="sctp", sportspec=100, dportspec=200, index=[1])
         self.generate_rules(dst_mask="255.255.255.0", src_spec="100.0.0.1", dst_spec="200.0.3.1", l4type="", index=[0])
         self.dut.send_expect("start", "testpmd> ", 60)
+        ret = self.pmdout.wait_link_status_up("all", 15)
+        self.verify(ret is True, "port link is down")
 
         # rule 0 test
         pcap_file = '/tmp/route_0.pcap'
@@ -628,6 +636,8 @@ class TestFlowClassifySoftnic(TestCase):
         self.generate_rules(src_spec="100.0.0.1", dst_spec="200.0.0.1", protospec=132, l4type="sctp", sportmask=self.portmask, sportspec=102, dportspec=200, index=[1])
         self.generate_rules(src_spec="100.0.0.1", dst_spec="200.0.0.1", sportmask=self.portmask, sportspec=103, dportspec=200, index=[0])
         self.dut.send_expect("start", "testpmd> ", 60)
+        ret = self.pmdout.wait_link_status_up("all", 15)
+        self.verify(ret is True, "port link is down")
 
         # rule 0 test
         pcap_file = '/tmp/route_0.pcap'
@@ -671,6 +681,8 @@ class TestFlowClassifySoftnic(TestCase):
         self.generate_rules(iptype="ipv6", src_mask=self.ipv6_mask, src_spec="ABCD:EF01:2345:6789:ABCD:EF01:2345:7789", protomask=self.protomask, protospec=132, l4type="sctp", index=[1])
         self.generate_rules(iptype="ipv6", src_mask=self.ipv6_mask, src_spec="ABCD:EF01:2345:6789:ABCD:EF01:2345:8789", protomask=self.protomask, sportmask=self.portmask, sportspec=100, index=[0])
         self.dut.send_expect("start", "testpmd> ", 60)
+        ret = self.pmdout.wait_link_status_up("all", 15)
+        self.verify(ret is True, "port link is down")
 
         # rule 0 test
         pcap_file = '/tmp/route_0.pcap'
@@ -728,6 +740,8 @@ class TestFlowClassifySoftnic(TestCase):
         self.generate_rules(iptype="ipv6", src_mask=self.ipv6_mask, src_spec="ABCD:EF01:2345:6789:ABCD:EF01:2345:7789", index=[1])
         self.generate_rules(iptype="ipv6", src_mask=self.ipv6_mask, src_spec="ABCD:EF01:2345:6789:ABCD:EF01:2345:8789", index=[0])
         self.dut.send_expect("start", "testpmd> ", 60)
+        ret = self.pmdout.wait_link_status_up("all", 15)
+        self.verify(ret is True, "port link is down")
 
         # rule 0 test
         pcap_file = '/tmp/route_0.pcap'
@@ -767,6 +781,8 @@ class TestFlowClassifySoftnic(TestCase):
         self.generate_rules(iptype="ipv6", dst_mask=self.ipv6_mask, dst_spec="ABCD:EF01:2345:6789:ABCD:EF01:2345:7789", index=[1])
         self.generate_rules(iptype="ipv6", dst_mask=self.ipv6_mask, dst_spec="ABCD:EF01:2345:6789:ABCD:EF01:2345:8789", index=[0])
         self.dut.send_expect("start", "testpmd> ", 60)
+        ret = self.pmdout.wait_link_status_up("all", 15)
+        self.verify(ret is True, "port link is down")
 
         # rule 0 test
         pcap_file = '/tmp/route_0.pcap'
@@ -810,6 +826,8 @@ class TestFlowClassifySoftnic(TestCase):
         self.generate_rules(iptype="ipv6", src_mask=self.ipv6_mask, dst_mask=self.ipv6_mask, src_spec="2001::3", dst_spec="0::3", protomask=self.protomask, protospec=132, l4type="sctp", sportmask=self.portmask, dportmask=self.portmask, sportspec=103, dportspec=203, index=[1])
         self.generate_rules(iptype="ipv6", src_mask=self.ipv6_mask, dst_mask=self.ipv6_mask, src_spec="2001::4", dst_spec="0::4", protomask=self.protomask, sportmask=self.portmask, dportmask=self.portmask, sportspec=104, dportspec=204, index=[0])
         self.dut.send_expect("start", "testpmd> ", 60)
+        ret = self.pmdout.wait_link_status_up("all", 15)
+        self.verify(ret is True, "port link is down")
 
         # rule 0 test
         pcap_file = '/tmp/route_0.pcap'
@@ -849,28 +867,32 @@ class TestFlowClassifySoftnic(TestCase):
         self.start_testpmd(filename, self.port_num)
 
         # create rule
-        self.dut.send_expect("flow create 4 group 0 ingress pattern eth / ipv4 proto mask 0 src mask 0.0.0.0 dst mask 255.255.255.255 src spec 100.0.0.1 dst spec 200.0.0.1 proto spec 17 / udp src mask 0 dst mask 0 src spec 100 dst spec 200 / end actions queue index 3 / end", "error", 60)
+        out = self.dut.send_expect("flow create 4 group 0 ingress pattern eth / ipv4 proto mask 0 src mask 0.0.0.0 dst mask 255.255.255.255 src spec 100.0.0.1 dst spec 200.0.0.1 proto spec 17 / udp src mask 0 dst mask 0 src spec 100 dst spec 200 / end actions queue index 3 / end", "testpmd>", 60)
         self.dut.send_expect("quit", "# ", 60)
+        self.verify("error" in out, "should fail to create the rule")
 
         cmd = "pipeline RX table match hash ext key 8 mask FFFFFF0000000000 offset 286 buckets 16K size 64K action AP0"
         self.set_table(cmd, filename)
         self.start_testpmd(filename, self.port_num)
-        self.dut.send_expect("flow create 4 group 0 ingress pattern eth / ipv4 proto mask 0 src mask 0.0.0.0 dst mask 255.255.255.255 src spec 100.0.0.1 dst spec 200.0.0.1 proto spec 17 / udp src mask 0 dst mask 0 src spec 100 dst spec 200 / end actions queue index 3 / end", "error", 60)
+        out = self.dut.send_expect("flow create 4 group 0 ingress pattern eth / ipv4 proto mask 0 src mask 0.0.0.0 dst mask 255.255.255.255 src spec 100.0.0.1 dst spec 200.0.0.1 proto spec 17 / udp src mask 0 dst mask 0 src spec 100 dst spec 200 / end actions queue index 3 / end", "testpmd>", 60)
         self.dut.send_expect("quit", "# ", 60)
+        self.verify("error" in out, "should fail to create the rule")
 
         # ipv6
         filename = "flow_ipv6_5tuple_hash_firmware.cli"
         cmd = "pipeline RX table match hash ext key 64 mask 0000FF00FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF000000000000000000000000000000000000000000000000 offset 274 buckets 16K size 64K action AP0"
         self.set_table(cmd, filename)
         self.start_testpmd(filename, self.port_num)
-        self.dut.send_expect("flow create 4 group 0 ingress pattern eth / ipv6 proto mask 255 src mask ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff dst mask ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff src spec 2001::1 dst spec 0::1 proto spec 17 / udp src mask 0 dst mask 65535 src spec 31 dst spec 41 / end actions queue index 3 / end", "error", 60)
+        out = self.dut.send_expect("flow create 4 group 0 ingress pattern eth / ipv6 proto mask 255 src mask ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff dst mask ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff src spec 2001::1 dst spec 0::1 proto spec 17 / udp src mask 0 dst mask 65535 src spec 31 dst spec 41 / end actions queue index 3 / end", "testpmd>", 60)
         self.dut.send_expect("quit", "# ", 60)
+        self.verify("error" in out, "should fail to create the rule")
 
         cmd = "pipeline RX table match hash ext key 16 mask FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF offset 294 buckets 16K size 64K action AP0"
         self.set_table(cmd, filename)
         self.start_testpmd(filename, self.port_num)
-        self.dut.send_expect("flow create 4 group 0 ingress pattern eth / ipv6 proto mask 0  src mask ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff dst mask 0:0:0:0:0:0:0:0 src spec ABCD:EF01:2345:6789:ABCD:EF01:2345:5789 dst spec 0:0:0:0:0:0:0:0 proto spec 17 / udp src mask 0 dst mask 0 src spec 0 dst spec 0 / end actions queue index 3 / end", "error", 60)
+        out = self.dut.send_expect("flow create 4 group 0 ingress pattern eth / ipv6 proto mask 0  src mask ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff dst mask 0:0:0:0:0:0:0:0 src spec ABCD:EF01:2345:6789:ABCD:EF01:2345:5789 dst spec 0:0:0:0:0:0:0:0 proto spec 17 / udp src mask 0 dst mask 0 src spec 0 dst spec 0 / end actions queue index 3 / end", "testpmd>", 60)
         self.dut.send_expect("quit", "# ", 60)
+        self.verify("error" in out, "should fail to create the rule")
 
     def test_ipv4_hash_rss_action(self):
         """
@@ -889,6 +911,8 @@ class TestFlowClassifySoftnic(TestCase):
         self.generate_rules(src_mask=self.ipv4_mask, dst_mask=self.ipv4_mask, src_spec="100.0.0.3", dst_spec="200.0.0.3", protomask=self.protomask, protospec=132, l4type="sctp", sportmask=self.portmask, dportmask=self.portmask, sportspec=100, dportspec=200, action="rss", index=[1])
         self.generate_rules(src_mask=self.ipv4_mask, dst_mask=self.ipv4_mask, src_spec="100.0.0.4", dst_spec="200.0.0.4", protomask=self.protomask, protospec=6, l4type="tcp", sportmask=self.portmask, dportmask=self.portmask, sportspec=100, dportspec=200, action="rss", index=[0])
         self.dut.send_expect("start", "testpmd> ", 60)
+        ret = self.pmdout.wait_link_status_up("all", 15)
+        self.verify(ret is True, "port link is down")
 
         # rule 0 test
         pcap_file = '/tmp/route_0.pcap'
@@ -926,6 +950,8 @@ class TestFlowClassifySoftnic(TestCase):
         self.generate_rules(src_mask="255.255.255.0", dst_mask=self.ipv4_mask, src_spec="100.0.0.1", dst_spec="200.0.0.1", protomask=self.protomask, sportmask=self.portmask, dportmask=self.portmask, sportspec=100, dportspec=200, action="rss", index=[0, 1, 2, 3])
         self.generate_rules(src_mask="255.255.255.0", dst_mask=self.ipv4_mask, src_spec="100.0.1.2", dst_spec="200.0.0.1", protomask=self.protomask, sportmask=self.portmask, dportmask=self.portmask, sportspec=100, dportspec=200, action="rss", index=[0, 1, 2, 3])
         self.dut.send_expect("start", "testpmd> ", 60)
+        ret = self.pmdout.wait_link_status_up("all", 15)
+        self.verify(ret is True, "port link is down")
 
         self.send_continuous_packet("ipv4", "src", "100.0.0.1", "200.0.0.1", self.tester_itf)
         out = self.dut.send_expect("stop", "testpmd> ", 120)
@@ -945,6 +971,8 @@ class TestFlowClassifySoftnic(TestCase):
         self.generate_rules(src_mask="255.255.0.0", dst_mask=self.ipv4_mask, src_spec="100.0.0.1", dst_spec="200.0.0.2", sportspec=100, dportspec=200, action="rss", index=[2, 3])
         self.generate_rules(src_mask="255.255.0.0", dst_mask=self.ipv4_mask, src_spec="200.0.0.1", dst_spec="200.0.0.2", sportspec=100, dportspec=200, action="rss", index=[1, 2])
         self.dut.send_expect("start", "testpmd> ", 60)
+        ret = self.pmdout.wait_link_status_up("all", 15)
+        self.verify(ret is True, "port link is down")
 
         self.send_continuous_packet("ipv4", "src", "100.0.0.1", "200.0.0.1", self.tester_itf)
         out = self.dut.send_expect("stop", "testpmd> ", 120)
@@ -977,6 +1005,8 @@ class TestFlowClassifySoftnic(TestCase):
         self.generate_rules(iptype="ipv6", src_mask=self.ipv6_mask, dst_mask=self.ipv6_mask, src_spec="2001::3", dst_spec="1001::3", protomask=self.protomask, protospec=132, l4type="sctp", sportmask=self.portmask, dportmask=self.portmask, sportspec=100, dportspec=200, action="rss", index=[1])
         self.generate_rules(iptype="ipv6", src_mask=self.ipv6_mask, dst_mask=self.ipv6_mask, src_spec="2001::4", dst_spec="1001::4", protomask=self.protomask, protospec=6, l4type="tcp", sportmask=self.portmask, dportmask=self.portmask, sportspec=100, dportspec=200, action="rss", index=[0])
         self.dut.send_expect("start", "testpmd> ", 60)
+        ret = self.pmdout.wait_link_status_up("all", 15)
+        self.verify(ret is True, "port link is down")
 
         # rule 0 test
         pcap_file = '/tmp/route_0.pcap'
@@ -1014,6 +1044,8 @@ class TestFlowClassifySoftnic(TestCase):
         self.generate_rules(iptype="ipv6", src_mask="ffff:ffff:ffff:ffff:ffff:ffff:ffff:0", dst_mask=self.ipv6_mask, src_spec="ABCD:EF01:2345:6789:ABCD:EF01:2345:0", dst_spec="0::1", protomask=self.protomask, sportmask=self.portmask, dportmask=self.portmask, sportspec=100, dportspec=200, action="rss", index=[0, 1, 2, 3])
         self.generate_rules(iptype="ipv6", src_mask="ffff:ffff:ffff:ffff:ffff:ffff:ffff:0", dst_mask=self.ipv6_mask, src_spec="ABCD:EF01:2345:6789:ABCD:EF01:2346:0", dst_spec="0::1", protomask=self.protomask, sportmask=self.portmask, dportmask=self.portmask, sportspec=100, dportspec=200, action="rss", index=[0, 1, 2, 3])
         self.dut.send_expect("start", "testpmd> ", 60)
+        ret = self.pmdout.wait_link_status_up("all", 15)
+        self.verify(ret is True, "port link is down")
 
         self.send_continuous_packet("ipv6", "src", "ABCD:EF01:2345:6789:ABCD:EF01:2345:0", "0::1", self.tester_itf)
         out = self.dut.send_expect("stop", "testpmd> ", 120)
@@ -1033,6 +1065,8 @@ class TestFlowClassifySoftnic(TestCase):
         self.generate_rules(iptype="ipv6", src_mask=self.ipv6_mask, dst_mask="ffff:ffff:ffff:ffff:ffff:ffff:ffff:0", src_spec="2001::2", dst_spec="1001::1", sportmask=self.portmask, dportmask=self.portmask, sportspec=100, dportspec=200, action="rss", index=[2, 3])
         self.generate_rules(iptype="ipv6", src_mask=self.ipv6_mask, dst_mask="ffff:ffff:ffff:ffff:ffff:ffff:ffff:0", src_spec="2001::1", dst_spec="1002::1", sportmask=self.portmask, dportmask=self.portmask, sportspec=100, dportspec=200, action="rss", index=[1, 2])
         self.dut.send_expect("start", "testpmd> ", 60)
+        ret = self.pmdout.wait_link_status_up("all", 15)
+        self.verify(ret is True, "port link is down")
 
         self.send_continuous_packet("ipv6", "dst", "2001::1", "1001::1", self.tester_itf)
         out = self.dut.send_expect("stop", "testpmd> ", 120)
@@ -1061,6 +1095,8 @@ class TestFlowClassifySoftnic(TestCase):
         self.generate_rules(port=port_num, dst_mask="255.192.0.0", dst_spec="200.0.0.0", protomask=self.protomask, sportmask=self.portmask, dportmask=self.portmask, sportspec=100, dportspec=200, action="jump", index=[1])
         self.generate_rules(port=port_num, dst_mask="255.192.0.0", dst_spec="200.64.0.0", protomask=self.protomask, sportmask=self.portmask, dportmask=self.portmask, sportspec=100, dportspec=200, action="jump", index=[1])
         self.dut.send_expect("start", "testpmd> ", 60)
+        ret = self.pmdout.wait_link_status_up("all", 15)
+        self.verify(ret is True, "port link is down")
 
         # rule 0 test
         pcap_file = '/tmp/route_0.pcap'
@@ -1105,6 +1141,8 @@ class TestFlowClassifySoftnic(TestCase):
         self.generate_rules(port=port_num, src_mask=self.ipv4_mask, dst_mask=self.ipv4_mask, src_spec="1.10.11.0", dst_spec="2.20.21.0", protomask=self.protomask, sportspec=100, dportspec=200, action="jump", index=[1])
         self.generate_rules(port=port_num, src_mask=self.ipv4_mask, dst_mask=self.ipv4_mask, src_spec="1.10.11.1", dst_spec="2.20.21.1", protomask=self.protomask, sportspec=100, dportspec=200, action="jump", index=[1])
         self.dut.send_expect("start", "testpmd> ", 60)
+        ret = self.pmdout.wait_link_status_up("all", 15)
+        self.verify(ret is True, "port link is down")
 
         # rule 0 test
         pcap_file = '/tmp/route_0.pcap'
@@ -1149,6 +1187,8 @@ class TestFlowClassifySoftnic(TestCase):
         self.generate_rules(port=port_num, src_mask=self.ipv4_mask, dst_mask=self.ipv4_mask, src_spec="1.10.11.0", dst_spec="2.20.21.0", protomask=self.protomask, sportspec=100, dportspec=200, action="jump", index=[1])
         self.generate_rules(port=port_num, src_mask=self.ipv4_mask, dst_mask=self.ipv4_mask, src_spec="1.10.11.1", dst_spec="2.20.21.1", protomask=self.protomask, sportspec=100, dportspec=200, action="jump", index=[1])
         self.dut.send_expect("start", "testpmd> ", 60)
+        ret = self.pmdout.wait_link_status_up("all", 15)
+        self.verify(ret is True, "port link is down")
 
         # rule 0 test
         pcap_file = '/tmp/route_0.pcap'
@@ -1189,6 +1229,8 @@ class TestFlowClassifySoftnic(TestCase):
         self.generate_rules(port=port_num, src_mask=self.ipv4_mask, dst_mask="255.255.255.0", src_spec="1.10.11.0", dst_spec="2.20.21.0", protomask=self.protomask, sportmask=self.portmask, dportmask=self.portmask, sportspec=100, dportspec=200, action="jump", index=[1])
         self.generate_rules(port=port_num, src_mask=self.ipv4_mask, dst_mask="255.255.255.0", src_spec="1.10.11.1", dst_spec="2.20.21.1", protomask=self.protomask, sportmask=self.portmask, dportmask=self.portmask, sportspec=100, dportspec=200, action="jump", index=[1])
         self.dut.send_expect("start", "testpmd> ", 60)
+        ret = self.pmdout.wait_link_status_up("all", 15)
+        self.verify(ret is True, "port link is down")
 
         # rule 0 test
         pcap_file = '/tmp/route_0.pcap'
@@ -1229,6 +1271,8 @@ class TestFlowClassifySoftnic(TestCase):
         self.generate_rules(port=port_num, iptype="ipv6", dst_mask=self.ipv6_mask, src_spec="1001::1", dst_spec="2001::1", protomask=self.protomask, sportspec=100, dportspec=200, action="jump", index=[1])
         self.generate_rules(port=port_num, iptype="ipv6", dst_mask=self.ipv6_mask, src_spec="1001::1", dst_spec="2001::2", protomask=self.protomask, sportspec=100, dportspec=200, action="jump", index=[1])
         self.dut.send_expect("start", "testpmd> ", 60)
+        ret = self.pmdout.wait_link_status_up("all", 15)
+        self.verify(ret is True, "port link is down")
 
         # rule 0 test
         pcap_file = '/tmp/route_0.pcap'
@@ -1266,6 +1310,8 @@ class TestFlowClassifySoftnic(TestCase):
         self.generate_rules(port=port_num, iptype="ipv6", src_mask=self.ipv6_mask, dst_mask=self.ipv6_mask, src_spec="1001::1", dst_spec="2001::1", protomask=self.protomask, sportmask=self.portmask, dportmask=self.portmask, sportspec=100, dportspec=200, action="jump", index=[1])
         self.generate_rules(port=port_num, iptype="ipv6", src_mask=self.ipv6_mask, dst_mask=self.ipv6_mask, src_spec="1001::2", dst_spec="2001::2", protomask=self.protomask, protospec=6, l4type="tcp", sportmask=self.portmask, dportmask=self.portmask, sportspec=100, dportspec=200, action="jump", index=[1])
         self.dut.send_expect("start", "testpmd> ", 60)
+        ret = self.pmdout.wait_link_status_up("all", 15)
+        self.verify(ret is True, "port link is down")
 
         # rule 0 test
         pcap_file = '/tmp/route_0.pcap'
@@ -1310,6 +1356,8 @@ class TestFlowClassifySoftnic(TestCase):
         self.generate_rules(port=port_num, iptype="ipv6", dst_mask=self.ipv6_mask, src_spec="1001::1", dst_spec="2001::1", protomask=self.protomask, sportspec=100, dportspec=200, action="jump", index=[1])
         self.generate_rules(port=port_num, iptype="ipv6", dst_mask=self.ipv6_mask, src_spec="1001::2", dst_spec="2001::2", protomask=self.protomask, sportspec=100, dportspec=200, action="jump", index=[1])
         self.dut.send_expect("start", "testpmd> ", 60)
+        ret = self.pmdout.wait_link_status_up("all", 15)
+        self.verify(ret is True, "port link is down")
 
         # rule 0 test
         pcap_file = '/tmp/route_0.pcap'
@@ -1348,6 +1396,8 @@ class TestFlowClassifySoftnic(TestCase):
         self.generate_rules(port=port_num, iptype="ipv6", src_mask=self.ipv6_mask, dst_mask=self.ipv6_mask, src_spec="1001::1", dst_spec="2001::1", protomask=self.protomask, sportmask=self.portmask, sportspec=100, dportspec=200, action="jump", index=[1])
         self.generate_rules(port=port_num, iptype="ipv6", src_mask=self.ipv6_mask, dst_mask=self.ipv6_mask, src_spec="1001::2", dst_spec="2001::2", protomask=self.protomask, sportmask=self.portmask, sportspec=100, dportspec=200, action="jump", index=[1])
         self.dut.send_expect("start", "testpmd> ", 60)
+        ret = self.pmdout.wait_link_status_up("all", 15)
+        self.verify(ret is True, "port link is down")
 
         # rule 0 test
         pcap_file = '/tmp/route_0.pcap'
-- 
2.17.1


             reply	other threads:[~2019-08-14  9:21 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-08-14 18:16 Wenjie Li [this message]
2019-08-14  9:22 ` Wu, ChangqingX

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=1565806590-21199-1-git-send-email-wenjiex.a.li@intel.com \
    --to=wenjiex.a.li@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).