diff mbox series

[styhead,14/31] oeqa/runtime/ssh: Rework ssh timeout

Message ID a94919397473e51d471f504a55b40b5b36d3f340.1732110892.git.steve@sakoman.com
State RFC
Delegated to: Steve Sakoman
Headers show
Series [styhead,01/31] cve-check: add field "modified" to JSON report | expand

Commit Message

Steve Sakoman Nov. 20, 2024, 1:56 p.m. UTC
From: Richard Purdie <richard.purdie@linuxfoundation.org>

After the changes to improve this test, we keep seeing image testing ssh
failures, particularly on mips.

It looks like part of the problem is that on a loaded system, 5s is too short
for mips to reliably establish an ssh connection. I've seen logs where it keeps
timing out and fails to work, then the debug code successfully uses ssh later after
everything else fails.

Change the timings/retries to give slow platforms enough time to respond.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
(cherry picked from commit ba64ccf3ad6e40461219b72d60eb0fe5cb38fddd)
Signed-off-by: Steve Sakoman <steve@sakoman.com>
---
 meta/lib/oeqa/runtime/cases/ssh.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
diff mbox series

Patch

diff --git a/meta/lib/oeqa/runtime/cases/ssh.py b/meta/lib/oeqa/runtime/cases/ssh.py
index b86428002f..f5b76edff4 100644
--- a/meta/lib/oeqa/runtime/cases/ssh.py
+++ b/meta/lib/oeqa/runtime/cases/ssh.py
@@ -16,7 +16,7 @@  class SSHTest(OERuntimeTestCase):
     @OETestDepends(['ping.PingTest.test_ping'])
     @OEHasPackage(['dropbear', 'openssh-sshd'])
     def test_ssh(self):
-        for i in range(20):
+        for i in range(5):
           status, output = self.target.run("uname -a", timeout=5)
           if status == 0:
               break
@@ -29,7 +29,7 @@  class SSHTest(OERuntimeTestCase):
               # give it time for the port to open.
               # We sometimes see -15 (SIGTERM) on slow emulation machines too, likely
               # from boot/init not being 100% complete, retry for these too.
-              time.sleep(5)
+              time.sleep(30)
               continue
           else:
               self.fail("uname failed with \"%s\" (exit code %s)" % (output, status))