]> git.ipfire.org Git - thirdparty/libvirt.git/commit
tests: Fix qemuxml2xmltest with audio driver defined in env
authorJim Fehlig <jfehlig@suse.com>
Thu, 1 Apr 2021 16:57:36 +0000 (10:57 -0600)
committerJim Fehlig <jfehlig@suse.com>
Thu, 1 Apr 2021 19:49:13 +0000 (13:49 -0600)
commitad3d6438fa0449dc9dcfda76431664501f75207a
treef263a21d099fd0e33e18156e58963d1e71bb0c0f
parent8dac0ca1b259c53d09983fe09f935baa18eb416c
tests: Fix qemuxml2xmltest with audio driver defined in env

If QEMU_AUDIO_DRV is defined in the build host environment, several tests
in qemuxml2xmltest fail.

$ env | grep -i audio
AUDIODRIVER=pulseaudio
QEMU_AUDIO_DRV=pa
SDL_AUDIODRIVER=pulse

An example test failure with the above environment

907) QEMU XML-2-XML-active video-virtio-gpu-sdl-gl
In 'libvirt/tests/qemuxml2xmloutdata/video-virtio-gpu-sdl-gl.xml':
Offset 1244
Expect [v]
Actual [audio id='1' type='pulseaudio'/>
    <v]

Scrub QEMU_AUDIO_DRV from the environment before executing the tests in
qemuxml2xmltest. SDL_AUDIODRIVER also needs scrubbed since it will be
examined if QEMU_AUDIO_DRV=sdl.

Signed-off-by: Jim Fehlig <jfehlig@suse.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
tests/qemuxml2xmltest.c