All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] qemurunner.py: print output from runqemu/qemu-system in stop()
@ 2021-08-25 22:35 Alexander Kanavin
  2021-08-26  9:42 ` [OE-core] " Richard Purdie
  0 siblings, 1 reply; 6+ messages in thread
From: Alexander Kanavin @ 2021-08-25 22:35 UTC (permalink / raw)
  To: openembedded-core; +Cc: 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 <alex.kanavin@gmail.com>
---
 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..e099c6e2a7 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.warning("Output from runqemu:\n%s" % self.getOutput(self.runqemu.stdout))
             self.runqemu.stdin.close()
             self.runqemu.stdout.close()
             self.runqemu_exited = True
-- 
2.31.1


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [OE-core] [PATCH] qemurunner.py: print output from runqemu/qemu-system in stop()
  2021-08-25 22:35 [PATCH] qemurunner.py: print output from runqemu/qemu-system in stop() Alexander Kanavin
@ 2021-08-26  9:42 ` Richard Purdie
  2021-08-26 10:45   ` Alexander Kanavin
  0 siblings, 1 reply; 6+ messages in thread
From: Richard Purdie @ 2021-08-26  9:42 UTC (permalink / raw)
  To: Alexander Kanavin, openembedded-core

On Thu, 2021-08-26 at 00:35 +0200, Alexander Kanavin wrote:
> 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>
> ---
>  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..e099c6e2a7 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.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


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [OE-core] [PATCH] qemurunner.py: print output from runqemu/qemu-system in stop()
  2021-08-26  9:42 ` [OE-core] " Richard Purdie
@ 2021-08-26 10:45   ` Alexander Kanavin
  2021-08-26 11:00     ` Richard Purdie
  0 siblings, 1 reply; 6+ messages in thread
From: Alexander Kanavin @ 2021-08-26 10:45 UTC (permalink / raw)
  To: Richard Purdie; +Cc: openembedded-core

[-- Attachment #1: Type: text/plain, Size: 1778 bytes --]

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

On Thu 26. Aug 2021 at 11.42, Richard Purdie <
richard.purdie@linuxfoundation.org> wrote:

> On Thu, 2021-08-26 at 00:35 +0200, Alexander Kanavin wrote:
> > 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>
> > ---
> >  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..e099c6e2a7 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.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
>
>

[-- Attachment #2: Type: text/html, Size: 2582 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [OE-core] [PATCH] qemurunner.py: print output from runqemu/qemu-system in stop()
  2021-08-26 10:45   ` Alexander Kanavin
@ 2021-08-26 11:00     ` Richard Purdie
  2021-08-26 11:10       ` Alexander Kanavin
  0 siblings, 1 reply; 6+ messages in thread
From: Richard Purdie @ 2021-08-26 11:00 UTC (permalink / raw)
  To: Alexander Kanavin; +Cc: openembedded-core

On Thu, 2021-08-26 at 12:45 +0200, Alexander Kanavin wrote:
> 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


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [OE-core] [PATCH] qemurunner.py: print output from runqemu/qemu-system in stop()
  2021-08-26 11:00     ` Richard Purdie
@ 2021-08-26 11:10       ` Alexander Kanavin
  0 siblings, 0 replies; 6+ messages in thread
From: Alexander Kanavin @ 2021-08-26 11:10 UTC (permalink / raw)
  To: Richard Purdie; +Cc: openembedded-core

[-- Attachment #1: Type: text/plain, Size: 693 bytes --]

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

On Thu 26. Aug 2021 at 13.01, Richard Purdie <
richard.purdie@linuxfoundation.org> wrote:

> On Thu, 2021-08-26 at 12:45 +0200, Alexander Kanavin wrote:
> > 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
>
>

[-- Attachment #2: Type: text/html, Size: 1101 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [OE-core] [PATCH] qemurunner.py: print output from runqemu/qemu-system in stop()
  2021-08-26 11:45 Alexander Kanavin
@ 2021-08-26 12:03 ` Richard Purdie
  0 siblings, 0 replies; 6+ messages in thread
From: Richard Purdie @ 2021-08-26 12:03 UTC (permalink / raw)
  To: Alexander Kanavin, openembedded-core

On Thu, 2021-08-26 at 13:45 +0200, Alexander Kanavin wrote:
> 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>
> ---
>  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

This isn't quite so simple I'm afraid:

https://autobuilder.yoctoproject.org/typhoon/#/builders/97/builds/3210/steps/16/logs/stdio

Cheers,

Richard


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2021-08-26 12:03 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-08-25 22:35 [PATCH] qemurunner.py: print output from runqemu/qemu-system in stop() Alexander Kanavin
2021-08-26  9:42 ` [OE-core] " Richard Purdie
2021-08-26 10:45   ` Alexander Kanavin
2021-08-26 11:00     ` Richard Purdie
2021-08-26 11:10       ` Alexander Kanavin
2021-08-26 11:45 Alexander Kanavin
2021-08-26 12:03 ` [OE-core] " Richard Purdie

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.