From: Richard Purdie <richard.purdie@linuxfoundation.org>
To: openembedded-core@lists.openembedded.org
Subject: [PATCH] oeqa/qemurunner: Add extra logging when console doesn't appear
Date: Tue, 10 Oct 2023 09:53:27 +0100 [thread overview]
Message-ID: <20231010085327.3677768-1-richard.purdie@linuxfoundation.org> (raw)
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 | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/meta/lib/oeqa/utils/qemurunner.py b/meta/lib/oeqa/utils/qemurunner.py
index 574696eb7e3..cb3231da63b 100644
--- a/meta/lib/oeqa/utils/qemurunner.py
+++ b/meta/lib/oeqa/utils/qemurunner.py
@@ -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
--
2.39.2
next reply other threads:[~2023-10-10 8:53 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-10-10 8:53 Richard Purdie [this message]
2023-10-10 9:15 ` [OE-core] [PATCH] oeqa/qemurunner: Add extra logging when console doesn't appear Mikko Rapeli
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20231010085327.3677768-1-richard.purdie@linuxfoundation.org \
--to=richard.purdie@linuxfoundation.org \
--cc=openembedded-core@lists.openembedded.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox