summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2023-07-27 15:17:32 +0100
committerSteve Sakoman <steve@sakoman.com>2023-08-26 04:24:02 -1000
commit0418f9112c07dda4d0256ca90cbdf5b34531b768 (patch)
tree5891f2f8873c1d0db74c36eeeeea1283d66a18e2
parent70b3a20817f66d688de16102953a6199f94bbf7d (diff)
downloadpoky-0418f9112c07dda4d0256ca90cbdf5b34531b768.tar.gz
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 <richard.purdie@linuxfoundation.org> (cherry picked from commit a8920c105725431e989cceb616bd04eaa52127ec) Signed-off-by: Steve Sakoman <steve@sakoman.com>
-rw-r--r--meta/lib/oeqa/core/target/ssh.py3
1 files changed, 3 insertions, 0 deletions
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):
250 except InterruptedError: 250 except InterruptedError:
251 logger.debug('InterruptedError') 251 logger.debug('InterruptedError')
252 continue 252 continue
253 except BlockingIOError:
254 logger.debug('BlockingIOError')
255 continue
253 256
254 process.stdout.close() 257 process.stdout.close()
255 258