]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core-contrib.git/commitdiff
oeqa/target/ssh: Ensure EAGAIN doesn't truncate output
authorRichard Purdie <richard.purdie@linuxfoundation.org>
Thu, 27 Jul 2023 14:17:32 +0000 (15:17 +0100)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Sat, 29 Jul 2023 07:25:07 +0000 (08:25 +0100)
We have a suspicion that the read() call may return EAGAIN on the non-blocking
fd and this may truncate test output leading to some of our intermittent failures.
Tweak the code to avoid this potential issue.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/lib/oeqa/core/target/ssh.py

index e650302052db06bda8e07ad83f0ce5e2cff9901c..243e45dd99e1e9fa77c24f3b9b4a48f064b2e9b1 100644 (file)
@@ -253,6 +253,9 @@ def SSHCall(command, logger, timeout=None, **opts):
                 except InterruptedError:
                     logger.debug('InterruptedError')
                     continue
+                except BlockingIOError:
+                    logger.debug('BlockingIOError')
+                    continue
 
             process.stdout.close()