]> code.ossystems Code Review - openembedded-core.git/commitdiff
qemurunner.py: handle getOutput() having nothing to read
authorAlexander Kanavin <alex.kanavin@gmail.com>
Thu, 26 Aug 2021 13:00:19 +0000 (15:00 +0200)
committerSteve Sakoman <steve@sakoman.com>
Fri, 27 Aug 2021 14:58:08 +0000 (04:58 -1000)
Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
(cherry picked from commit f4abfdeea175cfcadd6f73a69a676632ab4334a6)
Signed-off-by: Steve Sakoman <steve@sakoman.com>
meta/lib/oeqa/utils/qemurunner.py

index a9efb849d9c117be1ee4e8d86b6492c8270ff5f9..f7e5a3b3a64f6bcd8bd4f0020047ce18e6db9f92 100644 (file)
@@ -120,7 +120,10 @@ class QemuRunner:
         import fcntl
         fl = fcntl.fcntl(o, fcntl.F_GETFL)
         fcntl.fcntl(o, fcntl.F_SETFL, fl | os.O_NONBLOCK)
-        return os.read(o.fileno(), 1000000).decode("utf-8")
+        try:
+            return os.read(o.fileno(), 1000000).decode("utf-8")
+        except BlockingIOError:
+            return ""
 
 
     def handleSIGCHLD(self, signum, frame):