With the retry for the -SIGTERM, it is possible to still see that error
after the 5th attempt and mark the run a success. Check for any
non-zero status in the final check and error out to close the gap.
While there, make the error print match the one above and be a little
more verbose. Also, I'm seeing it take roughly 6 attempts on my local
(very slow) system to pass. So, increasing the number of attempts to
10.
Signed-off-by: Jon Mason <jdmason@kudzu.us>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
@OETestDepends(['ping.PingTest.test_ping'])
@OEHasPackage(['dropbear', 'openssh-sshd'])
def test_ssh(self):
- for i in range(5):
+ for i in range(10):
status, output = self.target.run("uname -a", timeout=5)
if status == 0:
break
continue
else:
self.fail("uname failed with \"%s\" (exit code %s)" % (output, status))
- if status == 255:
- self.fail("ssh error %s" %output)
+ if status != 0:
+ self.fail("ssh failed with \"%s\" (exit code %s)" % (output, status))