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: yocto-3.1.28~4 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=605d832e86f249100adaf3761b4e1701401d0b76;p=thirdparty%2Fopenembedded%2Fopenembedded-core.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 (cherry picked from commit a8920c105725431e989cceb616bd04eaa52127ec) Signed-off-by: Steve Sakoman --- diff --git a/meta/lib/oeqa/core/target/ssh.py b/meta/lib/oeqa/core/target/ssh.py index af4a67f266b..832b6216f65 100644 --- a/meta/lib/oeqa/core/target/ssh.py +++ b/meta/lib/oeqa/core/target/ssh.py @@ -226,6 +226,9 @@ def SSHCall(command, logger, timeout=None, **opts): endtime = time.time() + timeout except InterruptedError: continue + except BlockingIOError: + logger.debug('BlockingIOError') + continue # process hasn't returned yet if not eof: