tests: set QEMU_AUDIO_DRV=none for pci sound cards
PATCH 1/1 tests: set QEMU_AUDIO_DRV=none for pci sound cards
This way the tests run without sound hardware being present on the build machine. Even with sound hardware it IMO isn't very useful to use it in regression testing. Once the sound card tests are advanced enougth that they try to actually play sound we probably want the guests sound output written to a file (via QEMU_AUDIO_DRV=wav) rather than played on the build machines sound hardware.
--- tests/ac97-test.c | 3 +++ tests/es1370-test.c | 3 +++ tests/intel-hda-test.c | 3 +++ 3 files changed, 9 insertions(+)
tests/ac97-test.c +3 -0
@@ -8,6 +8,7 @@*/ #include <glib.h> +#include <stdlib.h> #include <string.h> #include "libqtest.h" #include "qemu/osdep.h"
@@ -21,6 +22,8 @@ int main(int argc, char **argv) {int ret; +setenv ("QEMU_AUDIO_DRV" ,"none" , true); +g_test_init (&argc, &argv,NULL );qtest_add_func ("/ac97/nop" , nop);
tests/es1370-test.c +3 -0
@@ -8,6 +8,7 @@*/ #include <glib.h> +#include <stdlib.h> #include <string.h> #include "libqtest.h" #include "qemu/osdep.h"
@@ -21,6 +22,8 @@ int main(int argc, char **argv) {int ret; +setenv ("QEMU_AUDIO_DRV" ,"none" , true); +g_test_init (&argc, &argv,NULL );qtest_add_func ("/es1370/nop" , nop);
tests/intel-hda-test.c +3 -0
@@ -8,6 +8,7 @@*/ #include <glib.h> +#include <stdlib.h> #include <string.h> #include "libqtest.h" #include "qemu/osdep.h"
@@ -35,6 +36,8 @@ int main(int argc, char **argv) {int ret; +setenv ("QEMU_AUDIO_DRV" ,"none" , true); +g_test_init (&argc, &argv,NULL );qtest_add_func ("/intel-hda/ich6" , ich6_test);qtest_add_func ("/intel-hda/ich9" , ich9_test);
Signature · 1 line
1.8.3.1
Quoted 9 lines · Gerd Hoffmann
This way the tests run without sound hardware being present on the build machine. Even with sound hardware it IMO isn't very useful to use it in regression testing. Once the sound card tests are advanced enougth that they try to actually play sound we probably want the guests sound output written to a file (via QEMU_AUDIO_DRV=wav) rather than played on the build machines sound hardware.
Signed-off-by Gerd Hoffmann <[email protected]>
Bonus: I no longer get "audio: Could not init `oss' audio driver" noise.
Ping?
Quoted 15 lines · Markus Armbruster
Quoted 9 lines · Gerd Hoffmann
This way the tests run without sound hardware being present on the build machine. Even with sound hardware it IMO isn't very useful to use it in regression testing. Once the sound card tests are advanced enougth that they try to actually play sound we probably want the guests sound output written to a file (via QEMU_AUDIO_DRV=wav) rather than played on the build machines sound hardware.
Signed-off-by Gerd Hoffmann <[email protected]>Bonus: I no longer get "audio: Could not init `oss' audio driver" noise.
Reviewed-by Markus Armbruster <[email protected]>
Quoted 9 lines · Gerd Hoffmann
This way the tests run without sound hardware being present on the build machine. Even with sound hardware it IMO isn't very useful to use it in regression testing. Once the sound card tests are advanced enougth that they try to actually play sound we probably want the guests sound output written to a file (via QEMU_AUDIO_DRV=wav) rather than played on the build machines sound hardware.
Signed-off-by Gerd Hoffmann <[email protected]>
Useful already:
Long term, won't it be cleaner to supply driver using a command line flag? Can be a patch on top ...
Quoted 72 lines
--- tests/ac97-test.c | 3 +++ tests/es1370-test.c | 3 +++ tests/intel-hda-test.c | 3 +++ 3 files changed, 9 insertions(+)tests/ac97-test.c +3
-0@@ -8,6 +8,7 @@*/ #include <glib.h> +#include <stdlib.h> #include <string.h> #include "libqtest.h" #include "qemu/osdep.h" @@ -21,6 +22,8 @@ int main(int argc, char **argv) {int ret; +setenv ("QEMU_AUDIO_DRV" ,"none" , true); +g_test_init (&argc, &argv,NULL );qtest_add_func ("/ac97/nop" , nop);tests/es1370-test.c +3
-0@@ -8,6 +8,7 @@*/ #include <glib.h> +#include <stdlib.h> #include <string.h> #include "libqtest.h" #include "qemu/osdep.h" @@ -21,6 +22,8 @@ int main(int argc, char **argv) {int ret; +setenv ("QEMU_AUDIO_DRV" ,"none" , true); +g_test_init (&argc, &argv,NULL );qtest_add_func ("/es1370/nop" , nop);tests/intel-hda-test.c +3
-0@@ -8,6 +8,7 @@*/ #include <glib.h> +#include <stdlib.h> #include <string.h> #include "libqtest.h" #include "qemu/osdep.h" @@ -35,6 +36,8 @@ int main(int argc, char **argv) {int ret; +setenv ("QEMU_AUDIO_DRV" ,"none" , true); +g_test_init (&argc, &argv,NULL );qtest_add_func ("/intel-hda/ich6" , ich6_test);qtest_add_func ("/intel-hda/ich9" , ich9_test);Signature · 1 line
1.8.3.1
Quoted 1 line · Markus Armbruster
Ping?
Back online. What is the state here? I've seen Stefan (Cc'ed) posted a different patch for the same issue? Anything merged meanwhile?
cheers,
Gerd
Quoted 18 lines
Quoted 15 lines · Markus Armbruster
Quoted 9 lines · Gerd Hoffmann
This way the tests run without sound hardware being present on the build machine. Even with sound hardware it IMO isn't very useful to use it in regression testing. Once the sound card tests are advanced enougth that they try to actually play sound we probably want the guests sound output written to a file (via QEMU_AUDIO_DRV=wav) rather than played on the build machines sound hardware.
Signed-off-by Gerd Hoffmann <[email protected]>Bonus: I no longer get "audio: Could not init `oss' audio driver" noise.
Reviewed-by Markus Armbruster <[email protected]>
Quoted 5 lines · Gerd Hoffmann
Quoted 1 line · Markus Armbruster
Ping?
Back online. What is the state here? I've seen Stefan (Cc'ed) posted a different patch for the same issue? Anything merged meanwhile?
Neither patch has been merged. Either would do for me :)
Quoted 5 lines · Gerd Hoffmann
Quoted 1 line · Markus Armbruster
Ping?
Back online. What is the state here? I've seen Stefan (Cc'ed) posted a different patch for the same issue? Anything merged meanwhile?
I am sending a v2 of my series that will use setenv(3) like you did except for all tests (Markus preferred that approach).
Stefan