Fixes for buildbot failures
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
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
@@ -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
PATCH 2/2 libqtest: launch QEMU with QEMU_AUDIO_DRV=none
In reply to Stefan HajnocziNo 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
@@ -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
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_OpenAudiofailed
sdl: Reason: No available audio device
sdl:SDL_OpenAudiofailed
sdl: Reason: No available audio device
audio: Failed to create voice `lm4549.out'Signed-off-by Stefan Hajnoczi <[email protected]>--- tests/libqtest.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)tests/libqtest.c +0
-0
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
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_OpenAudiofailed
sdl: Reason: No available audio device
sdl:SDL_OpenAudiofailed
sdl: Reason: No available audio device
audio: Failed to create voice `lm4549.out'Signed-off-by Stefan Hajnoczi <[email protected]>--- tests/libqtest.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)tests/libqtest.c +0
-0@@ -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
-1s->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
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
Re: [Qemu-devel] [PATCH 1/2] qapi.py: avoid Python 2.5+ any() function
In reply to Stefan HajnocziQuoted 10 lines · Stefan Hajnoczi
There is one instance of
any()inqapi.pythat 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, inparse_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
Signed-off-by Stefan Hajnoczi <[email protected]>--- scripts/qapi.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)scripts/qapi.py +4
-4@@ -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: continueSignature · 1 line
1.9.3
Re: [Qemu-devel] [PATCH 2/2] libqtest: launch QEMU with QEMU_AUDIO_DRV=none
In reply to Stefan HajnocziQuoted 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_OpenAudiofailed
sdl: Reason: No available audio device
sdl:SDL_OpenAudiofailed
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
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_OpenAudiofailed
sdl: Reason: No available audio device
sdl:SDL_OpenAudiofailed
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
Re: [Qemu-devel] [PATCH 1/2] qapi.py: avoid Python 2.5+ any() function
In reply to Riku VoipioQuoted 27 lines · Riku Voipio
Quoted 10 lines · Stefan Hajnoczi
There is one instance of
any()inqapi.pythat 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, inparse_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__
assertall(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
Re: [Qemu-devel] [PATCH 1/2] qapi.py: avoid Python 2.5+ any() function
In reply to Riku VoipioQuoted 27 lines · Riku Voipio
Quoted 10 lines · Stefan Hajnoczi
There is one instance of
any()inqapi.pythat 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, inparse_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__
assertall(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.