qemurunner.py: print output from runqemu/qemu-system in stop()
PATCH 1/1 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().
--- meta/lib/oeqa/utils/qemurunner.py | 2 ++ 1 file changed, 2 insertions(+)
meta/lib/oeqa/utils/qemurunner.py +2 -0
@@ -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.warning("Output from runqemu:\n%s" % self.getOutput(self.runqemu.stdout)) self.runqemu.stdin.close() self.runqemu.stdout.close() self.runqemu_exited = True
Signature · 1 line
2.31.1
Quoted 17 lines · Alexander Kanavin
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 <[email protected]>--- meta/lib/oeqa/utils/qemurunner.py | 2 ++ 1 file changed, 2 insertions(+)meta/lib/oeqa/utils/qemurunner.py +0
-0
meta/lib/oeqa/utils/qemurunner.py class QemuRunner: · line 542
Quoted 8 lines
meta/lib/oeqa/utils/qemurunner.py +2
-0@@ -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.warning("Output from runqemu:\n%s" % self.getOutput(self.runqemu.stdout)) self.runqemu.stdin.close() self.runqemu.stdout.close() self.runqemu_exited = True
I like the idea of this but it is showing warnings on the autobuilder:
https://autobuilder.yoctoproject.org/typhoon/#/builders/61/builds/3877
So we may need to fix the issue it is exposing?
Cheers,
Richard
It’s not a real warning, just that the print itself is issued as a warning. I think it just needs to be issued as info instead.
Alex
Quoted 40 lines · Richard Purdie
Quoted 7 lines · Alexander Kanavin
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().Review
Quoted 6 lines
Signed-off-by Alexander Kanavin <[email protected]>--- meta/lib/oeqa/utils/qemurunner.py | 2 ++ 1 file changed, 2 insertions(+)(quoted diff) +0
-0
b/meta/lib/oeqa/utils/qemurunner.pymeta/lib/oeqa/utils/qemurunner.py class QemuRunner: · line 539
Quoted 9 lines
index
5c9d2b24a3..e099c6e2a7100644meta/lib/oeqa/utils/qemurunner.py +2
-0@@ -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.warning("Output from runqemu:\n%s" %
self.getOutput(self.runqemu.stdout))meta/lib/oeqa/utils/qemurunner.py class QemuRunner: · line 542
Quoted 3 lines
meta/lib/oeqa/utils/qemurunner.py +0
-0self.runqemu.stdin.close() self.runqemu.stdout.close() self.runqemu_exited = TrueI like the idea of this but it is showing warnings on the autobuilder:
https://autobuilder.yoctoproject.org/typhoon/#/builders/61/builds/3877
So we may need to fix the issue it is exposing?
Cheers,
Richard
Quoted 2 lines · Alexander Kanavin
It’s not a real warning, just that the print itself is issued as a warning. I think it just needs to be issued as info instead.
Agreed, I realised that after replying to the patch. The current build is going rather orange! Will you send a v2 or should I tweak this one?
Cheers,
Richard
Please tweak, I will separately confirm that the original issue (virgl headless fail on Ubuntu 20.04) would be still including this directly in ab output. Replying from a sushi restaurant :)
Alex
Quoted 14 lines · Richard Purdie
Quoted 1 line · Alexander Kanavin
It’s not a real warning, just that the print itself is issued as a
warning. I
Quoted 1 line
think it just needs to be issued as info instead.
Agreed, I realised that after replying to the patch. The current build is going
rather orange! Will you send a v2 or should I tweak this one?Cheers,
Richard