From 6e2bf68e4401db747484c2c8ba0f77500b1d2d49 Mon Sep 17 00:00:00 2001 From: Alexander Kanavin Date: Thu, 26 Aug 2021 15:00:18 +0200 Subject: [PATCH] qemurunner.py: print output from runqemu/qemu-system in stop() This is done when starting up qemu has failed, but is not done when qemu started ok, but fails later in QMP communication. Output from runqemu does contain valuable information to find out why, so rather than fix all the QMP fails to include it, let's just print it in stop(). Signed-off-by: Alexander Kanavin Signed-off-by: Richard Purdie --- meta/lib/oeqa/utils/qemurunner.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/meta/lib/oeqa/utils/qemurunner.py b/meta/lib/oeqa/utils/qemurunner.py index 5c9d2b24a3..204ad8b918 100644 --- a/meta/lib/oeqa/utils/qemurunner.py +++ b/meta/lib/oeqa/utils/qemurunner.py @@ -535,6 +535,8 @@ class QemuRunner: if self.runqemu.poll() is None: self.logger.debug("Sending SIGKILL to runqemu") os.killpg(os.getpgid(self.runqemu.pid), signal.SIGKILL) + if not self.runqemu.stdout.closed: + self.logger.info("Output from runqemu:\n%s" % self.getOutput(self.runqemu.stdout)) self.runqemu.stdin.close() self.runqemu.stdout.close() self.runqemu_exited = True -- 2.40.1