From: Richard Purdie Date: Thu, 27 Jul 2023 14:17:32 +0000 (+0100) Subject: oeqa/target/ssh: Ensure EAGAIN doesn't truncate output X-Git-Tag: lucaceresoli/bug-15201-perf-libtraceevent-missing~269 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=a8920c105725431e989cceb616bd04eaa52127ec;p=thirdparty%2Fopenembedded%2Fopenembedded-core-contrib.git oeqa/target/ssh: Ensure EAGAIN doesn't truncate output 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 --- diff --git a/meta/lib/oeqa/core/target/ssh.py b/meta/lib/oeqa/core/target/ssh.py index e650302052d..243e45dd99e 100644 --- a/meta/lib/oeqa/core/target/ssh.py +++ b/meta/lib/oeqa/core/target/ssh.py @@ -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()