[dts][PATCH V1 2/2] tests/interrupt_pmd: wait for interface up
Yu Jiang
yux.jiang at intel.com
Thu Feb 24 16:28:51 CET 2022
optimize script: interrupt_pmd,
use new method: is_interface_up to to ensure iface's link status before send_packets
Signed-off-by: Yu Jiang <yux.jiang at intel.com>
---
tests/TestSuite_interrupt_pmd.py | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/tests/TestSuite_interrupt_pmd.py b/tests/TestSuite_interrupt_pmd.py
index db8efe44..dd413aca 100644
--- a/tests/TestSuite_interrupt_pmd.py
+++ b/tests/TestSuite_interrupt_pmd.py
@@ -129,10 +129,11 @@ class TestInterruptPmd(TestCase):
Send a packet to port
"""
for i in range(len(self.dut_ports[:portnum])):
+ txport = self.tester.get_local_port(self.dut_ports[i])
+ mac = self.dut.get_mac_address(self.dut_ports[i])
+ txItf = self.tester.get_interface(txport)
+ self.verify(self.tester.is_interface_up(intf=txItf), "Tester's %s should be up".format(txItf))
for j in range(num):
- txport = self.tester.get_local_port(self.dut_ports[i])
- mac = self.dut.get_mac_address(self.dut_ports[i])
- txItf = self.tester.get_interface(txport)
self.tester.scapy_append(
'sendp([Ether()/IP(dst="198.0.0.%d")/UDP()/Raw(\'X\'*18)], iface="%s")' % (j, txItf))
self.tester.scapy_execute()
--
2.25.1
More information about the dts
mailing list