Skip to contentSkip to conversation

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

PATCH New Alexander Kanavin 1 participant 1 message Jun 6, 2025

lore
Share & tools
lore
#0 lore raw

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

From: Alexander Kanavin <[email protected]>

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.

---
 meta/lib/oeqa/utils/sshcontrol.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
meta/lib/oeqa/utils/sshcontrol.py +1 -1
index 6c5648779a5..88a61aff635 100644
@@ -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:
Signature · 1 line
2.39.5