lib/oeqa/utils/sshcontrol: correct condition for ending the select() loop

This was set backwards; per https://docs.python.org/3/library/subprocess.html#subprocess.Popen.returncode
a return code of None indicates the process is still running,
and so the code entered a busyloop that ended on timeout
5 minutes later, lengthening selftests significantly.

(From OE-Core rev: a6690deffd7ddbce0e784701ea3fdbb84313b009)

Signed-off-by: Alexander Kanavin <alex@linutronix.de>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
Alexander Kanavin
2025-06-06 10:59:48 +02:00
committed by Richard Purdie
parent 4161032918
commit 3a48760dd8

View File

@@ -58,7 +58,7 @@ class SSHProcess(object):
data = os.read(self.process.stdout.fileno(), 1024)
if not data:
self.process.poll()
if self.process.returncode is None:
if self.process.returncode is not None:
self.process.stdout.close()
eof = True
else: