[V1] tests/vf_pmd_stacked_bonded: optimize scripts
Checks
Context |
Check |
Description |
ci/Intel-dts-format-test |
success
|
Testing OK
|
ci/Intel-dts-pylama-test |
success
|
Testing OK
|
ci/Intel-dts-suite-test |
success
|
Testing OK
|
Commit Message
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(-)
@@ -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