diff mbox series

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

Message ID 20250606085948.421114-1-alex.kanavin@gmail.com
State Accepted, archived
Commit a6690deffd7ddbce0e784701ea3fdbb84313b009
Headers show
Series lib/oeqa/utils/sshcontrol: correct condition for ending the select() loop | expand

Commit Message

Alexander Kanavin June 6, 2025, 8:59 a.m. UTC
From: Alexander Kanavin <alex@linutronix.de>

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.

Signed-off-by: Alexander Kanavin <alex@linutronix.de>
---
 meta/lib/oeqa/utils/sshcontrol.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/meta/lib/oeqa/utils/sshcontrol.py b/meta/lib/oeqa/utils/sshcontrol.py
index 6c5648779a5..88a61aff635 100644
--- a/meta/lib/oeqa/utils/sshcontrol.py
+++ b/meta/lib/oeqa/utils/sshcontrol.py
@@ -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: