summaryrefslogtreecommitdiffstats
path: root/meta/lib/oeqa/utils/qemurunner.py
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2023-10-09 17:50:31 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2023-10-10 09:53:32 +0100
commitc0af426af86d634b2bcef4d76e5c46b46dde7acf (patch)
treef84a09fba2516659e19e89ed28d440364a0abe78 /meta/lib/oeqa/utils/qemurunner.py
parent44b4c74cad0a5126d46408afa9e86ed50899aec3 (diff)
downloadpoky-c0af426af86d634b2bcef4d76e5c46b46dde7acf.tar.gz
oeqa/qemurunner: Add extra logging when console doesn't appear
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. (From OE-Core rev: be3724854947ded160789d0353b7efb8c593040f) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/lib/oeqa/utils/qemurunner.py')
-rw-r--r--meta/lib/oeqa/utils/qemurunner.py10
1 files changed, 10 insertions, 0 deletions
diff --git a/meta/lib/oeqa/utils/qemurunner.py b/meta/lib/oeqa/utils/qemurunner.py
index 574696eb7e..cb3231da63 100644
--- a/meta/lib/oeqa/utils/qemurunner.py
+++ b/meta/lib/oeqa/utils/qemurunner.py
@@ -519,6 +519,16 @@ class QemuRunner:
519 self.logger.warning("Last 25 lines of all logging (%d):\n%s" % (len(self.msg), tail(self.msg))) 519 self.logger.warning("Last 25 lines of all logging (%d):\n%s" % (len(self.msg), tail(self.msg)))
520 self.logger.warning("Check full boot log: %s" % self.logfile) 520 self.logger.warning("Check full boot log: %s" % self.logfile)
521 self.stop() 521 self.stop()
522 data = True
523 while data:
524 try:
525 time.sleep(1)
526 data = qemusock.recv(1024)
527 self.log(data, extension = ".2")
528 self.logger.warning('Extra log data read: %s\n' % (data.decode('utf-8', errors='backslashreplace')))
529 except Exception as e:
530 self.logger.warning('Extra log data exception %s' % repr(e))
531 data = None
522 return False 532 return False
523 533
524 # If we are not able to login the tests can continue 534 # If we are not able to login the tests can continue