]> code.ossystems Code Review - openembedded-core.git/commitdiff
lib/oeqa: sshcontrol: fix false timeout failures
authorStefan Stanacar <stefanx.stanacar@intel.com>
Fri, 17 Jan 2014 15:57:47 +0000 (17:57 +0200)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Wed, 22 Jan 2014 07:18:01 +0000 (07:18 +0000)
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.

Signed-off-by: Stefan Stanacar <stefanx.stanacar@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/lib/oeqa/utils/sshcontrol.py

index a0dcf023bd92da691f9be4bb6df6c956971db67f..3e53ec3e892f64b91ba290889c61e7fa4676eb2f 100644 (file)
@@ -77,7 +77,7 @@ class SSHControl(object):
                         endtime = time.time() + tdelta
 
             # process hasn't returned yet
-            if sshconn.poll() is None:
+            if not eof:
                 sshconn.terminate()
                 time.sleep(3)
                 try:
@@ -86,7 +86,7 @@ class SSHControl(object):
                     pass
                 output += "\n[!!! SSH command killed - no output for %d seconds. Total running time: %d seconds." % (tdelta, time.time() - self._starttime)
 
-        self._ret = sshconn.poll()
+        self._ret = sshconn.wait()
         # strip the last LF so we can test the output
         self._out = output.rstrip()
         self.log("%s" % self._out)