Skip to contentSkip to conversation

Fixes for buildbot failures

PATCH Superseded Stefan Hajnoczi 6 participants 10 messages Aug 12, 2014 – Aug 27, 2014

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

cover Fixes for buildbot failures

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(-)
Signature · 1 line
1.9.3
#1 lore raw

PATCH 1/2 qapi.py: avoid Python 2.5+ any() function

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

---
 scripts/qapi.py | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
scripts/qapi.py +4 -4
index f2c6d1f..77d46aa 100644
@@ -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
Signature · 1 line
1.9.3
#2 lore raw

Re: [Qemu-devel] [PATCH 1/2] qapi.py: avoid Python 2.5+ any() function

Quoted 10 lines · Stefan Hajnoczi

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__

Quoted 2 lines
    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

Quoted 27 lines
---
 scripts/qapi.py | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
scripts/qapi.py +4 -4
index f2c6d1f..77d46aa 100644
@@ -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
Signature · 1 line
1.9.3
#3 lore raw

Re: [Qemu-devel] [PATCH 1/2] qapi.py: avoid Python 2.5+ any() function

Quoted 27 lines · Riku Voipio
Quoted 10 lines · Stefan Hajnoczi

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__

Quoted 2 lines
    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)

Quoted 2 lines

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

#4 lore raw

Re: [Qemu-devel] [PATCH 1/2] qapi.py: avoid Python 2.5+ any() function

In reply to Riku Voipio
Quoted 27 lines · Riku Voipio
Quoted 10 lines · Stefan Hajnoczi

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__

Quoted 2 lines
    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)

Quoted 2 lines

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.

#5 lore raw

PATCH 2/2 libqtest: launch QEMU with QEMU_AUDIO_DRV=none

In reply to Stefan Hajnoczi

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'

---
 tests/libqtest.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
tests/libqtest.c +1 -1
index 98e8f4b..2abb6f2 100644
@@ -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 "
Signature · 1 line
1.9.3
#6 lore raw

Re: [Qemu-devel] [PATCH 2/2] libqtest: launch QEMU with QEMU_AUDIO_DRV=none

Quoted 20 lines · Stefan Hajnoczi

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'

---
 tests/libqtest.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
tests/libqtest.c +0 -0
index 98e8f4b..2abb6f2 100644

tests/libqtest.c QTestState *qtest_init(const char *extra_args) · line 171

Quoted 8 lines
tests/libqtest.c +1 -1
@@ -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

#7 lore raw

Re: [Qemu-devel] [PATCH 2/2] libqtest: launch QEMU with QEMU_AUDIO_DRV=none

Am 12.08.2014 14:57, schrieb Markus Armbruster:

Quoted 23 lines
Quoted 21 lines · Stefan Hajnoczi

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'

---
 tests/libqtest.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
tests/libqtest.c +0 -0
index 98e8f4b..2abb6f2 100644
@@ -165,7 +165,7 @@ QTestState *qtest_init(const char *extra_args)
 
Quoted 10 lines

tests/libqtest.c QTestState *qtest_init(const char *extra_args) · line 171

Quoted 7 lines
tests/libqtest.c +1 -1
     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

Quoted 1 line

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

Signature · 2 lines
SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany
GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer; HRB 16746 AG Nürnberg
#8 lore raw

Re: [Qemu-devel] [PATCH 2/2] libqtest: launch QEMU with QEMU_AUDIO_DRV=none

In reply to Stefan Hajnoczi
Quoted 9 lines · Stefan Hajnoczi

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

#9 lore raw

Re: [Qemu-devel] [PATCH 2/2] libqtest: launch QEMU with QEMU_AUDIO_DRV=none

Quoted 11 lines · Peter Maydell
Quoted 9 lines · Stefan Hajnoczi

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'

Quoted 4 lines

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