summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStefan Stanacar <stefanx.stanacar@intel.com>2014-01-17 17:57:47 +0200
committerRichard Purdie <richard.purdie@linuxfoundation.org>2014-01-22 07:20:03 +0000
commite9fae95f303165bb1a075cb007f2959e8e1b1c96 (patch)
tree450cef0034f36b5b71eb58d5170dc3455f3ac744
parenta29d2708e78e02c30f928b44734db398b9c44939 (diff)
downloadpoky-e9fae95f303165bb1a075cb007f2959e8e1b1c96.tar.gz
lib/oeqa: sshcontrol: fix false timeout failures
Ocasionally AB shows odd false fails like: http://autobuilder.yoctoproject.org/main/builders/nightly-arm/builds/1/steps/Running%20Sanity%20Tests/logs/stdio This should fix that by checking for eof instead of polling the return code of the ssh process, because the process might still be there. (From OE-Core rev: 3a22b5df5aa38a98b35bc2931d646a2b7702fbec) Signed-off-by: Stefan Stanacar <stefanx.stanacar@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r--meta/lib/oeqa/utils/sshcontrol.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/meta/lib/oeqa/utils/sshcontrol.py b/meta/lib/oeqa/utils/sshcontrol.py
index a0dcf023bd..3e53ec3e89 100644
--- a/meta/lib/oeqa/utils/sshcontrol.py
+++ b/meta/lib/oeqa/utils/sshcontrol.py
@@ -77,7 +77,7 @@ class SSHControl(object):
77 endtime = time.time() + tdelta 77 endtime = time.time() + tdelta
78 78
79 # process hasn't returned yet 79 # process hasn't returned yet
80 if sshconn.poll() is None: 80 if not eof:
81 sshconn.terminate() 81 sshconn.terminate()
82 time.sleep(3) 82 time.sleep(3)
83 try: 83 try:
@@ -86,7 +86,7 @@ class SSHControl(object):
86 pass 86 pass
87 output += "\n[!!! SSH command killed - no output for %d seconds. Total running time: %d seconds." % (tdelta, time.time() - self._starttime) 87 output += "\n[!!! SSH command killed - no output for %d seconds. Total running time: %d seconds." % (tdelta, time.time() - self._starttime)
88 88
89 self._ret = sshconn.poll() 89 self._ret = sshconn.wait()
90 # strip the last LF so we can test the output 90 # strip the last LF so we can test the output
91 self._out = output.rstrip() 91 self._out = output.rstrip()
92 self.log("%s" % self._out) 92 self.log("%s" % self._out)