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>
This commit is contained in:
Richard Purdie
2023-07-27 15:17:32 +01:00
committed by Steve Sakoman
parent 70b3a20817
commit 0418f9112c

View File

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