test suite reviews and discussions
 help / color / mirror / Atom feed
* [dts] [PATCH V1] tests/vf_pmd_stacked_bonded: optimize scripts
@ 2023-06-30 15:19 Jiale Song
  0 siblings, 0 replies; only message in thread
From: Jiale Song @ 2023-06-30 15:19 UTC (permalink / raw)
  To: dts; +Cc: Jiale Song

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@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


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2023-06-30  7:03 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-06-30 15:19 [dts] [PATCH V1] tests/vf_pmd_stacked_bonded: optimize scripts Jiale Song

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).