All of lore.kernel.org
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH 0/2] Fixes for buildbot failures
@ 2014-08-12 12:37 Stefan Hajnoczi
  2014-08-12 12:37 ` [Qemu-devel] [PATCH 1/2] qapi.py: avoid Python 2.5+ any() function Stefan Hajnoczi
  2014-08-12 12:37 ` [Qemu-devel] [PATCH 2/2] libqtest: launch QEMU with QEMU_AUDIO_DRV=none Stefan Hajnoczi
  0 siblings, 2 replies; 10+ messages in thread
From: Stefan Hajnoczi @ 2014-08-12 12:37 UTC (permalink / raw)
  To: qemu-devel; +Cc: Markus Armbruster, Stefan Hajnoczi, Andreas Faerber

I just did a sweep of the buildbot at
http://buildbot.b1-systems.de/qemu/builders.

These patches solve issues on RHEL5 and OpenBSD buildslaves.

Stefan Hajnoczi (2):
  qapi.py: avoid Python 2.5+ any() function
  libqtest: launch QEMU with QEMU_AUDIO_DRV=none

 scripts/qapi.py  | 8 ++++----
 tests/libqtest.c | 2 +-
 2 files changed, 5 insertions(+), 5 deletions(-)

-- 
1.9.3

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

* [Qemu-devel] [PATCH 1/2] qapi.py: avoid Python 2.5+ any() function
  2014-08-12 12:37 [Qemu-devel] [PATCH 0/2] Fixes for buildbot failures Stefan Hajnoczi
@ 2014-08-12 12:37 ` Stefan Hajnoczi
  2014-08-15  7:43   ` Riku Voipio
  2014-08-12 12:37 ` [Qemu-devel] [PATCH 2/2] libqtest: launch QEMU with QEMU_AUDIO_DRV=none Stefan Hajnoczi
  1 sibling, 1 reply; 10+ messages in thread
From: Stefan Hajnoczi @ 2014-08-12 12:37 UTC (permalink / raw)
  To: qemu-devel; +Cc: Markus Armbruster, Stefan Hajnoczi, Andreas Faerber

There is one instance of any() in qapi.py that breaks builds on older
distros that ship Python 2.4 (like RHEL5):

  GEN   qmp-commands.h
Traceback (most recent call last):
  File "build/scripts/qapi-commands.py", line 445, in ?
    exprs = parse_schema(input_file)
  File "build/scripts/qapi.py", line 329, in parse_schema
    schema = QAPISchema(open(input_file, "r"))
  File "build/scripts/qapi.py", line 110, in __init__
    if any(include_path == elem[1]
NameError: global name 'any' is not defined

Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
---
 scripts/qapi.py | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/scripts/qapi.py b/scripts/qapi.py
index f2c6d1f..77d46aa 100644
--- a/scripts/qapi.py
+++ b/scripts/qapi.py
@@ -107,10 +107,10 @@ class QAPISchema:
                                         'Expected a file name (string), got: %s'
                                         % include)
                 include_path = os.path.join(self.input_dir, include)
-                if any(include_path == elem[1]
-                       for elem in self.include_hist):
-                    raise QAPIExprError(expr_info, "Inclusion loop for %s"
-                                        % include)
+                for elem in self.include_hist:
+                    if include_path == elem[1]:
+                        raise QAPIExprError(expr_info, "Inclusion loop for %s"
+                                            % include)
                 # skip multiple include of the same file
                 if include_path in previously_included:
                     continue
-- 
1.9.3

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

* [Qemu-devel] [PATCH 2/2] libqtest: launch QEMU with QEMU_AUDIO_DRV=none
  2014-08-12 12:37 [Qemu-devel] [PATCH 0/2] Fixes for buildbot failures Stefan Hajnoczi
  2014-08-12 12:37 ` [Qemu-devel] [PATCH 1/2] qapi.py: avoid Python 2.5+ any() function Stefan Hajnoczi
@ 2014-08-12 12:37 ` Stefan Hajnoczi
  2014-08-12 12:57   ` Markus Armbruster
  2014-08-15 12:08   ` Peter Maydell
  1 sibling, 2 replies; 10+ messages in thread
From: Stefan Hajnoczi @ 2014-08-12 12:37 UTC (permalink / raw)
  To: qemu-devel; +Cc: Markus Armbruster, Stefan Hajnoczi, Andreas Faerber

No test case actually uses the audio backend.  Disable audio to prevent
errors on hosts with no sound hardware present:

  GTESTER check-qtest-aarch64
  sdl: SDL_OpenAudio failed
  sdl: Reason: No available audio device
  sdl: SDL_OpenAudio failed
  sdl: Reason: No available audio device
  audio: Failed to create voice `lm4549.out'

Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
---
 tests/libqtest.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tests/libqtest.c b/tests/libqtest.c
index 98e8f4b..2abb6f2 100644
--- a/tests/libqtest.c
+++ b/tests/libqtest.c
@@ -165,7 +165,7 @@ QTestState *qtest_init(const char *extra_args)
 
     s->qemu_pid = fork();
     if (s->qemu_pid == 0) {
-        command = g_strdup_printf("exec %s "
+        command = g_strdup_printf("QEMU_AUDIO_DRV=none exec %s "
                                   "-qtest unix:%s,nowait "
                                   "-qtest-log /dev/null "
                                   "-qmp unix:%s,nowait "
-- 
1.9.3

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

* Re: [Qemu-devel] [PATCH 2/2] libqtest: launch QEMU with QEMU_AUDIO_DRV=none
  2014-08-12 12:37 ` [Qemu-devel] [PATCH 2/2] libqtest: launch QEMU with QEMU_AUDIO_DRV=none Stefan Hajnoczi
@ 2014-08-12 12:57   ` Markus Armbruster
  2014-08-12 13:20     ` Andreas Färber
  2014-08-15 12:08   ` Peter Maydell
  1 sibling, 1 reply; 10+ messages in thread
From: Markus Armbruster @ 2014-08-12 12:57 UTC (permalink / raw)
  To: Stefan Hajnoczi; +Cc: Gerd Hoffmann, qemu-devel, Andreas Faerber

Stefan Hajnoczi <stefanha@redhat.com> writes:

> No test case actually uses the audio backend.  Disable audio to prevent
> errors on hosts with no sound hardware present:
>
>   GTESTER check-qtest-aarch64
>   sdl: SDL_OpenAudio failed
>   sdl: Reason: No available audio device
>   sdl: SDL_OpenAudio failed
>   sdl: Reason: No available audio device
>   audio: Failed to create voice `lm4549.out'
>
> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
> ---
>  tests/libqtest.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/tests/libqtest.c b/tests/libqtest.c
> index 98e8f4b..2abb6f2 100644
> --- a/tests/libqtest.c
> +++ b/tests/libqtest.c
> @@ -165,7 +165,7 @@ QTestState *qtest_init(const char *extra_args)
>  
>      s->qemu_pid = fork();
>      if (s->qemu_pid == 0) {
> -        command = g_strdup_printf("exec %s "
> +        command = g_strdup_printf("QEMU_AUDIO_DRV=none exec %s "
>                                    "-qtest unix:%s,nowait "
>                                    "-qtest-log /dev/null "
>                                    "-qmp unix:%s,nowait "

Gerd (cc'ed) solved this differently in his patch[*].  I'm fine with
either.


[*] https://lists.nongnu.org/archive/html/qemu-devel/2014-07/msg03087.html

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

* Re: [Qemu-devel] [PATCH 2/2] libqtest: launch QEMU with QEMU_AUDIO_DRV=none
  2014-08-12 12:57   ` Markus Armbruster
@ 2014-08-12 13:20     ` Andreas Färber
  0 siblings, 0 replies; 10+ messages in thread
From: Andreas Färber @ 2014-08-12 13:20 UTC (permalink / raw)
  To: Markus Armbruster, Stefan Hajnoczi; +Cc: qemu-devel, Gerd Hoffmann

Am 12.08.2014 14:57, schrieb Markus Armbruster:
> Stefan Hajnoczi <stefanha@redhat.com> writes:
> 
>> No test case actually uses the audio backend.  Disable audio to prevent
>> errors on hosts with no sound hardware present:
>>
>>   GTESTER check-qtest-aarch64
>>   sdl: SDL_OpenAudio failed
>>   sdl: Reason: No available audio device
>>   sdl: SDL_OpenAudio failed
>>   sdl: Reason: No available audio device
>>   audio: Failed to create voice `lm4549.out'
>>
>> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
>> ---
>>  tests/libqtest.c | 2 +-
>>  1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/tests/libqtest.c b/tests/libqtest.c
>> index 98e8f4b..2abb6f2 100644
>> --- a/tests/libqtest.c
>> +++ b/tests/libqtest.c
>> @@ -165,7 +165,7 @@ QTestState *qtest_init(const char *extra_args)
>>  
>>      s->qemu_pid = fork();
>>      if (s->qemu_pid == 0) {
>> -        command = g_strdup_printf("exec %s "
>> +        command = g_strdup_printf("QEMU_AUDIO_DRV=none exec %s "
>>                                    "-qtest unix:%s,nowait "
>>                                    "-qtest-log /dev/null "
>>                                    "-qmp unix:%s,nowait "
> 
> Gerd (cc'ed) solved this differently in his patch[*].  I'm fine with
> either.

Hm, Gerd's patch seems to only touch audio-specific tests but not the
generic qom-test for instance. What about doing Gerd's setenv() in
Stefan's generic code? Not cluttering the shell call even more would
make it easier to some day convert to an array-based API. Not a priority
though.

Cheers,
Andreas

> [*] https://lists.nongnu.org/archive/html/qemu-devel/2014-07/msg03087.html

-- 
SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany
GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer; HRB 16746 AG Nürnberg

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

* Re: [Qemu-devel] [PATCH 1/2] qapi.py: avoid Python 2.5+ any() function
  2014-08-12 12:37 ` [Qemu-devel] [PATCH 1/2] qapi.py: avoid Python 2.5+ any() function Stefan Hajnoczi
@ 2014-08-15  7:43   ` Riku Voipio
  2014-08-27  9:05     ` Stefan Hajnoczi
  2014-08-27 11:01     ` Stefan Hajnoczi
  0 siblings, 2 replies; 10+ messages in thread
From: Riku Voipio @ 2014-08-15  7:43 UTC (permalink / raw)
  To: Stefan Hajnoczi; +Cc: qemu-devel, Andreas Faerber, Markus Armbruster

On Tue, Aug 12, 2014 at 01:37:33PM +0100, Stefan Hajnoczi wrote:
> There is one instance of any() in qapi.py that breaks builds on older
> distros that ship Python 2.4 (like RHEL5):
> 
>   GEN   qmp-commands.h
> Traceback (most recent call last):
>   File "build/scripts/qapi-commands.py", line 445, in ?
>     exprs = parse_schema(input_file)
>   File "build/scripts/qapi.py", line 329, in parse_schema
>     schema = QAPISchema(open(input_file, "r"))
>   File "build/scripts/qapi.py", line 110, in __init__
>     if any(include_path == elem[1]
> NameError: global name 'any' is not defined

I tried building on RHEL5, and this patch gets a bit more forward.
However further down the build I get a similar error:

Traceback (most recent call last):
  File "/build/qemu/scripts/tracetool.py", line 139, in ?
    main(sys.argv)
  File "/build/qemu/scripts/tracetool.py", line 134, in main
    binary=binary, probe_prefix=probe_prefix)
  File "/build/qemu/scripts/tracetool/__init__.py", line 267, in generate
    backend = tracetool.backend.Wrapper(backends, format)
  File "/build/qemu/scripts/tracetool/backend/__init__.py", line 105, in __init__
    assert all(exists(backend) for backend in self._backends)

semi-related - since I'm building --disable-system --disable-tools --enable-user,
is there any benefit of tracetool for this build config?

Riku


> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
> ---
>  scripts/qapi.py | 8 ++++----
>  1 file changed, 4 insertions(+), 4 deletions(-)
> 
> diff --git a/scripts/qapi.py b/scripts/qapi.py
> index f2c6d1f..77d46aa 100644
> --- a/scripts/qapi.py
> +++ b/scripts/qapi.py
> @@ -107,10 +107,10 @@ class QAPISchema:
>                                          'Expected a file name (string), got: %s'
>                                          % include)
>                  include_path = os.path.join(self.input_dir, include)
> -                if any(include_path == elem[1]
> -                       for elem in self.include_hist):
> -                    raise QAPIExprError(expr_info, "Inclusion loop for %s"
> -                                        % include)
> +                for elem in self.include_hist:
> +                    if include_path == elem[1]:
> +                        raise QAPIExprError(expr_info, "Inclusion loop for %s"
> +                                            % include)
>                  # skip multiple include of the same file
>                  if include_path in previously_included:
>                      continue
> -- 
> 1.9.3
> 

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

* Re: [Qemu-devel] [PATCH 2/2] libqtest: launch QEMU with QEMU_AUDIO_DRV=none
  2014-08-12 12:37 ` [Qemu-devel] [PATCH 2/2] libqtest: launch QEMU with QEMU_AUDIO_DRV=none Stefan Hajnoczi
  2014-08-12 12:57   ` Markus Armbruster
@ 2014-08-15 12:08   ` Peter Maydell
  2014-08-15 15:12     ` Stefan Hajnoczi
  1 sibling, 1 reply; 10+ messages in thread
From: Peter Maydell @ 2014-08-15 12:08 UTC (permalink / raw)
  To: Stefan Hajnoczi; +Cc: QEMU Developers, Andreas Faerber, Markus Armbruster

On 12 August 2014 13:37, Stefan Hajnoczi <stefanha@redhat.com> wrote:
> No test case actually uses the audio backend.  Disable audio to prevent
> errors on hosts with no sound hardware present:
>
>   GTESTER check-qtest-aarch64
>   sdl: SDL_OpenAudio failed
>   sdl: Reason: No available audio device
>   sdl: SDL_OpenAudio failed
>   sdl: Reason: No available audio device
>   audio: Failed to create voice `lm4549.out'

These are just warnings, right? This shouldn't cause the
tests to actually fail... It makes sense to make sure we suppress
the irrelevant warnings and behave consistently on all test
hosts, though.

thanks
-- PMM

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

* Re: [Qemu-devel] [PATCH 2/2] libqtest: launch QEMU with QEMU_AUDIO_DRV=none
  2014-08-15 12:08   ` Peter Maydell
@ 2014-08-15 15:12     ` Stefan Hajnoczi
  0 siblings, 0 replies; 10+ messages in thread
From: Stefan Hajnoczi @ 2014-08-15 15:12 UTC (permalink / raw)
  To: Peter Maydell
  Cc: Markus Armbruster, QEMU Developers, Stefan Hajnoczi, Andreas Faerber

On Fri, Aug 15, 2014 at 1:08 PM, Peter Maydell <peter.maydell@linaro.org> wrote:
> On 12 August 2014 13:37, Stefan Hajnoczi <stefanha@redhat.com> wrote:
>> No test case actually uses the audio backend.  Disable audio to prevent
>> errors on hosts with no sound hardware present:
>>
>>   GTESTER check-qtest-aarch64
>>   sdl: SDL_OpenAudio failed
>>   sdl: Reason: No available audio device
>>   sdl: SDL_OpenAudio failed
>>   sdl: Reason: No available audio device
>>   audio: Failed to create voice `lm4549.out'
>
> These are just warnings, right? This shouldn't cause the
> tests to actually fail... It makes sense to make sure we suppress
> the irrelevant warnings and behave consistently on all test
> hosts, though.

Yes, they are just warnings.  Initially I thought they were errors
that cause the build to fail.

Stefan

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

* Re: [Qemu-devel] [PATCH 1/2] qapi.py: avoid Python 2.5+ any() function
  2014-08-15  7:43   ` Riku Voipio
@ 2014-08-27  9:05     ` Stefan Hajnoczi
  2014-08-27 11:01     ` Stefan Hajnoczi
  1 sibling, 0 replies; 10+ messages in thread
From: Stefan Hajnoczi @ 2014-08-27  9:05 UTC (permalink / raw)
  To: Riku Voipio
  Cc: Markus Armbruster, qemu-devel, Stefan Hajnoczi, Andreas Faerber

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

On Fri, Aug 15, 2014 at 10:43:24AM +0300, Riku Voipio wrote:
> On Tue, Aug 12, 2014 at 01:37:33PM +0100, Stefan Hajnoczi wrote:
> > There is one instance of any() in qapi.py that breaks builds on older
> > distros that ship Python 2.4 (like RHEL5):
> > 
> >   GEN   qmp-commands.h
> > Traceback (most recent call last):
> >   File "build/scripts/qapi-commands.py", line 445, in ?
> >     exprs = parse_schema(input_file)
> >   File "build/scripts/qapi.py", line 329, in parse_schema
> >     schema = QAPISchema(open(input_file, "r"))
> >   File "build/scripts/qapi.py", line 110, in __init__
> >     if any(include_path == elem[1]
> > NameError: global name 'any' is not defined
> 
> I tried building on RHEL5, and this patch gets a bit more forward.
> However further down the build I get a similar error:
> 
> Traceback (most recent call last):
>   File "/build/qemu/scripts/tracetool.py", line 139, in ?
>     main(sys.argv)
>   File "/build/qemu/scripts/tracetool.py", line 134, in main
>     binary=binary, probe_prefix=probe_prefix)
>   File "/build/qemu/scripts/tracetool/__init__.py", line 267, in generate
>     backend = tracetool.backend.Wrapper(backends, format)
>   File "/build/qemu/scripts/tracetool/backend/__init__.py", line 105, in __init__
>     assert all(exists(backend) for backend in self._backends)
> 
> semi-related - since I'm building --disable-system --disable-tools --enable-user,
> is there any benefit of tracetool for this build config?

Tracetool is part of the build process, there is no way to skip it.

Stefan

[-- Attachment #2: Type: application/pgp-signature, Size: 473 bytes --]

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

* Re: [Qemu-devel] [PATCH 1/2] qapi.py: avoid Python 2.5+ any() function
  2014-08-15  7:43   ` Riku Voipio
  2014-08-27  9:05     ` Stefan Hajnoczi
@ 2014-08-27 11:01     ` Stefan Hajnoczi
  1 sibling, 0 replies; 10+ messages in thread
From: Stefan Hajnoczi @ 2014-08-27 11:01 UTC (permalink / raw)
  To: Riku Voipio
  Cc: Markus Armbruster, qemu-devel, Stefan Hajnoczi, Andreas Faerber

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

On Fri, Aug 15, 2014 at 10:43:24AM +0300, Riku Voipio wrote:
> On Tue, Aug 12, 2014 at 01:37:33PM +0100, Stefan Hajnoczi wrote:
> > There is one instance of any() in qapi.py that breaks builds on older
> > distros that ship Python 2.4 (like RHEL5):
> > 
> >   GEN   qmp-commands.h
> > Traceback (most recent call last):
> >   File "build/scripts/qapi-commands.py", line 445, in ?
> >     exprs = parse_schema(input_file)
> >   File "build/scripts/qapi.py", line 329, in parse_schema
> >     schema = QAPISchema(open(input_file, "r"))
> >   File "build/scripts/qapi.py", line 110, in __init__
> >     if any(include_path == elem[1]
> > NameError: global name 'any' is not defined
> 
> I tried building on RHEL5, and this patch gets a bit more forward.
> However further down the build I get a similar error:
> 
> Traceback (most recent call last):
>   File "/build/qemu/scripts/tracetool.py", line 139, in ?
>     main(sys.argv)
>   File "/build/qemu/scripts/tracetool.py", line 134, in main
>     binary=binary, probe_prefix=probe_prefix)
>   File "/build/qemu/scripts/tracetool/__init__.py", line 267, in generate
>     backend = tracetool.backend.Wrapper(backends, format)
>   File "/build/qemu/scripts/tracetool/backend/__init__.py", line 105, in __init__
>     assert all(exists(backend) for backend in self._backends)
> 
> semi-related - since I'm building --disable-system --disable-tools --enable-user,
> is there any benefit of tracetool for this build config?

I will send a new revision with additional fixes.

[-- Attachment #2: Type: application/pgp-signature, Size: 473 bytes --]

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

end of thread, other threads:[~2014-08-27 11:01 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-08-12 12:37 [Qemu-devel] [PATCH 0/2] Fixes for buildbot failures Stefan Hajnoczi
2014-08-12 12:37 ` [Qemu-devel] [PATCH 1/2] qapi.py: avoid Python 2.5+ any() function Stefan Hajnoczi
2014-08-15  7:43   ` Riku Voipio
2014-08-27  9:05     ` Stefan Hajnoczi
2014-08-27 11:01     ` Stefan Hajnoczi
2014-08-12 12:37 ` [Qemu-devel] [PATCH 2/2] libqtest: launch QEMU with QEMU_AUDIO_DRV=none Stefan Hajnoczi
2014-08-12 12:57   ` Markus Armbruster
2014-08-12 13:20     ` Andreas Färber
2014-08-15 12:08   ` Peter Maydell
2014-08-15 15:12     ` Stefan Hajnoczi

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.