test suite reviews and discussions
 help / color / mirror / Atom feed
* [dts][PATCH V1] tests/vf_pmd_stacked_bonded: optimize script to check link status
@ 2023-05-29 15:41 Weiyuan Li
  2023-06-07  5:58 ` lijuan.tu
  0 siblings, 1 reply; 2+ messages in thread
From: Weiyuan Li @ 2023-05-29 15:41 UTC (permalink / raw)
  To: dts; +Cc: Weiyuan Li

Optimize the testing script to check the status of the link. If the status is down, execute the up command.

Signed-off-by: Weiyuan Li <weiyuanx.li@intel.com>
---
 tests/TestSuite_vf_pmd_stacked_bonded.py | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/tests/TestSuite_vf_pmd_stacked_bonded.py b/tests/TestSuite_vf_pmd_stacked_bonded.py
index 615e9517..0a5bc2be 100644
--- a/tests/TestSuite_vf_pmd_stacked_bonded.py
+++ b/tests/TestSuite_vf_pmd_stacked_bonded.py
@@ -403,7 +403,8 @@ class TestVFPmdStackedBonded(TestCase):
         self.verify("bsdapp" not in self.target, "Bonding not support freebsd")
         self.dut_ports = self.dut.get_ports()
         self.dport_info0 = self.dut.ports_info[self.dut_ports[0]]
-        self.dport_ifaces = self.dport_info0["intf"]
+        self.dport_ifaces_port0 = self.dport_info0["intf"]
+        self.dport_ifaces_port1 = self.dut.ports_info[self.dut_ports[1]]["intf"]
         num_ports = len(self.dut_ports)
         self.verify(num_ports == 2 or num_ports == 4, "Insufficient ports")
         tester_port0 = self.tester.get_local_port(self.dut_ports[0])
@@ -444,6 +445,11 @@ 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.eal_param = ""
         for pci in self.vfs_pci:
             self.eal_param += " -a %s" % pci
-- 
2.34.1


^ permalink raw reply	[flat|nested] 2+ messages in thread

* [dts][PATCH V1] tests/vf_pmd_stacked_bonded: optimize script to check link status
  2023-05-29 15:41 [dts][PATCH V1] tests/vf_pmd_stacked_bonded: optimize script to check link status Weiyuan Li
@ 2023-06-07  5:58 ` lijuan.tu
  0 siblings, 0 replies; 2+ messages in thread
From: lijuan.tu @ 2023-06-07  5:58 UTC (permalink / raw)
  To: dts, Weiyuan Li; +Cc: Weiyuan Li

On Mon, 29 May 2023 15:41:11 +0000, Weiyuan Li <weiyuanx.li@intel.com> wrote:
> Optimize the testing script to check the status of the link. If the status is down, execute the up command.
> 
> Signed-off-by: Weiyuan Li <weiyuanx.li@intel.com>


Applied, thanks

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2023-06-07  5:58 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-05-29 15:41 [dts][PATCH V1] tests/vf_pmd_stacked_bonded: optimize script to check link status Weiyuan Li
2023-06-07  5:58 ` lijuan.tu

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