diff mbox series

[1/2] oeqa/target/ssh: Ensure EAGAIN doesn't truncate output

Message ID 20230727162700.1576131-1-richard.purdie@linuxfoundation.org
State Accepted, archived
Commit a8920c105725431e989cceb616bd04eaa52127ec
Headers show
Series [1/2] oeqa/target/ssh: Ensure EAGAIN doesn't truncate output | expand

Commit Message

Richard Purdie July 27, 2023, 4:26 p.m. UTC
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 | 3 +++
 1 file changed, 3 insertions(+)
diff mbox series

Patch

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()