From 0418f9112c07dda4d0256ca90cbdf5b34531b768 Mon Sep 17 00:00:00 2001 From: Richard Purdie Date: Thu, 27 Jul 2023 15:17:32 +0100 Subject: 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. (From OE-Core rev: 4c02f7407d7afaefe1bc72aea25087b3f2271ac2) Signed-off-by: Richard Purdie (cherry picked from commit a8920c105725431e989cceb616bd04eaa52127ec) Signed-off-by: Steve Sakoman --- meta/lib/oeqa/core/target/ssh.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/meta/lib/oeqa/core/target/ssh.py b/meta/lib/oeqa/core/target/ssh.py index 4ab0cddb43..7c206ff105 100644 --- a/meta/lib/oeqa/core/target/ssh.py +++ b/meta/lib/oeqa/core/target/ssh.py @@ -250,6 +250,9 @@ def SSHCall(command, logger, timeout=None, **opts): except InterruptedError: logger.debug('InterruptedError') continue + except BlockingIOError: + logger.debug('BlockingIOError') + continue process.stdout.close() -- cgit v1.2.3-54-g00ecf