From 55597ca4651496d3b85c6b138a3d83f7b493d9d2 Mon Sep 17 00:00:00 2001 From: baogen shang Date: Mon, 10 Mar 2025 17:52:01 +0800 Subject: [PATCH] Fix bcm57414 nic test failed issue MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit when testing the bcm57414 nic port down/up.If we execute the "ip link set xxxx down", then no wait to execute "ip link set xxxx up" command.It will lead to the nic "NO-CARRIER, state DOWN" status. the nic can't recovery. so sleep 5S to wait the port down. Signed-off-by: baogen shang --- tests/compatible/network/network.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/compatible/network/network.py b/tests/compatible/network/network.py index 68f7627..0bf71f2 100644 --- a/tests/compatible/network/network.py +++ b/tests/compatible/network/network.py @@ -136,6 +136,7 @@ class NetworkTest(Test): :return: """ self.command.run_cmd("ip link set down %s" % interface) + time.sleep(5) for _ in range(10): result = self.command.run_cmd( "ip link show %s | grep 'state DOWN'" % interface, ignore_errors=False) @@ -143,7 +144,7 @@ class NetworkTest(Test): self.logger.info("Set interface %s down succeed." % self.interface) return True time.sleep(1) - + self.logger.error("Set interface %s down failed." % self.interface) return False -- Gitee