summaryrefslogtreecommitdiffstats
path: root/meta/lib/oeqa/utils/qemurunner.py
diff options
context:
space:
mode:
authorMikko Rapeli <mikko.rapeli@linaro.org>2023-05-10 15:59:35 +0300
committerRichard Purdie <richard.purdie@linuxfoundation.org>2023-05-25 10:29:08 +0100
commit7fbf5fdd02bbd9766a90e78dd1fcf98bc26b961c (patch)
treefd1ae2129e716b0f3c44b254fd9db0210763c4b1 /meta/lib/oeqa/utils/qemurunner.py
parentd7d3ce115601a45af8088be596b5594a512767ab (diff)
downloadpoky-7fbf5fdd02bbd9766a90e78dd1fcf98bc26b961c.tar.gz
qemurunner: add boot logs to do_testimage task logs in real time
Complex boot sequences take a lot of time to reach serial console login. In our case boot involves multiple bootloaders like u-boot and grub, then hypervisors like xen, then initramfs images which do things like validating secure boot and encrypting the main rootfs. All these happen before main rootfs serial console login prompt is reached and thus many things can go wrong, including race conditions, hangs and deadlocks, and thus logging the details is important for development. This change adds the qemu serial console logs to do_testimage task logs while they are being read out. The logs are not added to bitbake output. This enables debugging and tracing the do_testimage via task log file while the boot and tests are running. (From OE-Core rev: cb62fae6ea3e411643395b12e56c363ce4d73e5d) Signed-off-by: Mikko Rapeli <mikko.rapeli@linaro.org> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> 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.py1
1 files changed, 1 insertions, 0 deletions
diff --git a/meta/lib/oeqa/utils/qemurunner.py b/meta/lib/oeqa/utils/qemurunner.py
index c06268f5bc..7f520d47c3 100644
--- a/meta/lib/oeqa/utils/qemurunner.py
+++ b/meta/lib/oeqa/utils/qemurunner.py
@@ -480,6 +480,7 @@ class QemuRunner:
480 self.logger.error('Invalid file type: %s\n%s' % (file)) 480 self.logger.error('Invalid file type: %s\n%s' % (file))
481 read = b'' 481 read = b''
482 482
483 self.logger.debug2('Partial boot log:\n%s' % (read.decode('utf-8', errors='ignore')))
483 data = data + read 484 data = data + read
484 if data: 485 if data:
485 bootlog += data 486 bootlog += data