[dts][PATCH V1 2/2] tests/short_live: wait for interface up
Yu Jiang
yux.jiang at intel.com
Thu Feb 10 17:32:26 CET 2022
use new method: is_interface_up/down to to ensure iface's link status.
Signed-off-by: Yu Jiang <yux.jiang at intel.com>
---
tests/TestSuite_short_live.py | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/tests/TestSuite_short_live.py b/tests/TestSuite_short_live.py
index 1b8fbb94..0d090682 100644
--- a/tests/TestSuite_short_live.py
+++ b/tests/TestSuite_short_live.py
@@ -106,7 +106,8 @@ class TestShortLiveApp(TestCase):
# rx and tx packet are list
if (txPort == rxPort):
count = 2
-
+ # ensure tester's link up
+ self.verify(self.tester.is_interface_up(intf=rxitf), "Wrong link status, should be up")
filter_list = [{'layer': 'ether', 'config': {'type': 'not IPv6'}}, {'layer': 'userdefined', 'config': {'pcap-filter': 'not udp'}}]
inst = self.tester.tcpdump_sniff_packets(rxitf, count=count,filters=filter_list)
@@ -144,7 +145,6 @@ class TestShortLiveApp(TestCase):
"""
#dpdk start
self.dut.send_expect("./%s %s -- -i --portmask=0x3" % (self.app_testpmd, self.eal_para()), "testpmd>", 120)
- time.sleep(5)
self.dut.send_expect("set fwd mac", "testpmd>")
self.dut.send_expect("set promisc all off", "testpmd>")
self.dut.send_expect("start", "testpmd>")
--
2.25.1
More information about the dts
mailing list