[dts] [PATCH V1] tests/vf_pmd_stacked_bonded: optimize scripts

Jiale Song songx.jiale at intel.com
Fri Jun 30 17:19:43 CEST 2023


when rebinding the network card to the kdriver, the network card link
status is down, and the network card should be up first before checking
the status.

Signed-off-by: Jiale Song <songx.jiale at intel.com>
---
 tests/TestSuite_vf_pmd_stacked_bonded.py | 9 ++++-----
 1 file changed, 4 insertions(+), 5 deletions(-)

diff --git a/tests/TestSuite_vf_pmd_stacked_bonded.py b/tests/TestSuite_vf_pmd_stacked_bonded.py
index 4c3fe634..f330db55 100644
--- a/tests/TestSuite_vf_pmd_stacked_bonded.py
+++ b/tests/TestSuite_vf_pmd_stacked_bonded.py
@@ -445,11 +445,10 @@ class TestVfPmdStackedBonded(TestCase):
         Run before each test case.
         """
         self.create_vfs(pf_list=self.dut_ports, vf_num=1)
-        port0_stats = self.dut.is_interface_up(self.dport_ifaces_port0)
-        port1_stats = self.dut.is_interface_up(self.dport_ifaces_port1)
-        if not all([port0_stats, port1_stats]):
-            self.dut.send_expect(f"ip link set {self.dport_ifaces_port0} up", "# ")
-            self.dut.send_expect(f"ip link set {self.dport_ifaces_port1} up", "# ")
+        self.dut.send_expect(f"ip link set {self.dport_ifaces_port0} up", "# ")
+        self.dut.send_expect(f"ip link set {self.dport_ifaces_port1} up", "# ")
+        self.dut.is_interface_up(self.dport_ifaces_port0)
+        self.dut.is_interface_up(self.dport_ifaces_port1)
         self.eal_param = ""
         for pci in self.vfs_pci:
             self.eal_param += " -a %s" % pci
-- 
2.25.1



More information about the dts mailing list