test suite reviews and discussions
 help / color / mirror / Atom feed
* [dts][PATCH V1] tests/pmd_bonded_8023ad: wait link status up
@ 2022-05-25  7:26 Yu
  2022-05-25 11:11 ` lijuan.tu
  0 siblings, 1 reply; 2+ messages in thread
From: Yu @ 2022-05-25  7:26 UTC (permalink / raw)
  To: dts; +Cc: Yu Jiang

From: Yu Jiang <yux.jiang@intel.com>

Optimize script by using method wait_link_status_up to make script more stable

Signed-off-by: Yu Jiang <yux.jiang@intel.com>
---
 tests/TestSuite_pmd_bonded_8023ad.py | 22 ++++++++++++----------
 1 file changed, 12 insertions(+), 10 deletions(-)

diff --git a/tests/TestSuite_pmd_bonded_8023ad.py b/tests/TestSuite_pmd_bonded_8023ad.py
index 88d07bfd..8dd12d2b 100644
--- a/tests/TestSuite_pmd_bonded_8023ad.py
+++ b/tests/TestSuite_pmd_bonded_8023ad.py
@@ -162,7 +162,10 @@ class TestBonding8023AD(TestCase):
         self.bond_inst.d_console([start_fmt(self.bond_port), "", 15])
         time.sleep(5)
         self.bond_inst.d_console(["start", "", 10])
-        self.logger.info("set bond port ready done !!!")
+        self.verify(
+            self.bond_inst.testpmd.wait_link_status_up("all"),
+            "Failed to set bond port ready!!!",
+        )
 
     def run_8023ad_pre(self, slaves, bond_mode):
         bond_port = self.set_8023ad_bonded(slaves, bond_mode)
@@ -173,7 +176,10 @@ class TestBonding8023AD(TestCase):
         time.sleep(2)
         cmds = ["port start all", "", 10]
         self.bond_inst.d_console(cmds)
-        time.sleep(2)
+        self.verify(
+            self.bond_inst.testpmd.wait_link_status_up("all"),
+            "run_8023ad_pre: Failed to start all port",
+        )
         return bond_port
 
     def bonding_8023ad_check_macs_without_slaves(self, bond_port):
@@ -249,14 +255,10 @@ class TestBonding8023AD(TestCase):
         # start bonded device
         cmds = ["port start {0}".format(bond_port), "", 10]
         self.bond_inst.d_console(cmds)
-        status = self.bond_inst.get_port_info(bond_port, "link_status")
-        if status != "up":
-            msg = "bond port {0} fail to set up".format(bond_port)
-            self.logger.error(msg)
-            raise VerifyFailure(msg)
-        else:
-            msg = "bond port {0} set up successful !".format(bond_port)
-            self.logger.info(msg)
+        self.verify(
+            self.bond_inst.testpmd.wait_link_status_up("all", timeout=30),
+            "bond port {0} fail to set up".format(bond_port),
+        )
 
     def check_bonded_device_promisc_mode(self, slaves, bond_port):
         # disable bonded device promiscuous mode
-- 
2.25.1


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

* [dts][PATCH V1] tests/pmd_bonded_8023ad: wait link status up
  2022-05-25  7:26 [dts][PATCH V1] tests/pmd_bonded_8023ad: wait link status up Yu
@ 2022-05-25 11:11 ` lijuan.tu
  0 siblings, 0 replies; 2+ messages in thread
From: lijuan.tu @ 2022-05-25 11:11 UTC (permalink / raw)
  To: dts, Yu; +Cc: Yu Jiang

On Wed, 25 May 2022 15:26:17 +0800, Yu <yux.jiang@intel.com> wrote:
> From: Yu Jiang <yux.jiang@intel.com>
> 
> Optimize script by using method wait_link_status_up to make script more stable
> 
> Signed-off-by: Yu Jiang <yux.jiang@intel.com>


Applied, thanks

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

end of thread, other threads:[~2022-05-25 11:11 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-05-25  7:26 [dts][PATCH V1] tests/pmd_bonded_8023ad: wait link status up Yu
2022-05-25 11:11 ` 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).