]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core-contrib.git/commitdiff
lib/oeqa/utils/sshcontrol: correct condition for ending the select() loop
authorAlexander Kanavin <alex@linutronix.de>
Fri, 6 Jun 2025 08:59:48 +0000 (10:59 +0200)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Mon, 9 Jun 2025 16:43:20 +0000 (17:43 +0100)
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>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/lib/oeqa/utils/sshcontrol.py

index 6c5648779a54127e09a8ae3b1541ed6dc4ade2bd..88a61aff6351eb8686009bdeeac8effe013ed528 100644 (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: