]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core-contrib.git/commitdiff
oeqa/qemurunner: Add extra logging when console doesn't appear
authorRichard Purdie <richard.purdie@linuxfoundation.org>
Mon, 9 Oct 2023 16:50:31 +0000 (17:50 +0100)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Tue, 10 Oct 2023 08:51:37 +0000 (09:51 +0100)
If the console doesn't appear, breifly sleep and try an extra read. This
is a useful debugging trick which we may as well preserve in the code. We're
already failing at this point so extra data is useful.

This means if we perturb things on the other port, we may gain useful logging
insight.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/lib/oeqa/utils/qemurunner.py

index 574696eb7e3ff0208bea76371c4f7772a52e80d1..cb3231da63b0c961973d2e8591b65539c1cb6160 100644 (file)
@@ -519,6 +519,16 @@ class QemuRunner:
             self.logger.warning("Last 25 lines of all logging (%d):\n%s" % (len(self.msg), tail(self.msg)))
             self.logger.warning("Check full boot log: %s" % self.logfile)
             self.stop()
+            data = True
+            while data:
+                try:
+                    time.sleep(1)
+                    data = qemusock.recv(1024)
+                    self.log(data, extension = ".2")
+                    self.logger.warning('Extra log data read: %s\n' % (data.decode('utf-8', errors='backslashreplace')))
+                except Exception as e:
+                    self.logger.warning('Extra log data exception %s' % repr(e))
+                    data = None
             return False
 
         # If we are not able to login the tests can continue