]> code.ossystems Code Review - openembedded-core.git/commitdiff
qemurunner.py: print output from runqemu/qemu-system in stop()
authorAlexander Kanavin <alex.kanavin@gmail.com>
Thu, 26 Aug 2021 13:00:18 +0000 (15:00 +0200)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Fri, 27 Aug 2021 10:53:23 +0000 (11:53 +0100)
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 <alex.kanavin@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/lib/oeqa/utils/qemurunner.py

index 5c9d2b24a3de5245216e680bccf3fd02e325f18a..204ad8b918c0b3e541c7d088388919801e87f6a9 100644 (file)
@@ -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