]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core.git/commitdiff
oeqa/target/ssh: Ensure EAGAIN doesn't truncate output
authorRichard Purdie <richard.purdie@linuxfoundation.org>
Thu, 27 Jul 2023 14:17:32 +0000 (15:17 +0100)
committerSteve Sakoman <steve@sakoman.com>
Mon, 11 Sep 2023 15:22:20 +0000 (05:22 -1000)
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>
(cherry picked from commit a8920c105725431e989cceb616bd04eaa52127ec)
Signed-off-by: Steve Sakoman <steve@sakoman.com>
meta/lib/oeqa/core/target/ssh.py

index af4a67f266b46894fc0af4d954a233298be857e3..832b6216f6591faae55400259561d901935a29ac 100644 (file)
@@ -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: