[libvirt] [PATCH 3/3] When testing qemu, unset the SDL driver environment variables.

Matthias Bolte matthias.bolte at googlemail.com
Mon Dec 28 15:35:56 UTC 2009


2009/12/23 Diego Elio Pettenò <flameeyes at gmail.com>:
> With these variables present, the tests would fail because they are not
> expected.
> ---
>  tests/qemuxml2argvtest.c |    2 ++
>  1 files changed, 2 insertions(+), 0 deletions(-)
>
> diff --git a/tests/qemuxml2argvtest.c b/tests/qemuxml2argvtest.c
> index 3b0aa2b..b64dc6a 100644
> --- a/tests/qemuxml2argvtest.c
> +++ b/tests/qemuxml2argvtest.c
> @@ -188,6 +188,8 @@ mymain(int argc, char **argv)
>     unsetenv("TMPDIR");
>     unsetenv("LD_PRELOAD");
>     unsetenv("LD_LIBRARY_PATH");
> +    unsetenv("SDL_AUDIODRIVER");
> +    unsetenv("SDL_VIDEODRIVER");
>
>     DO_TEST("minimal", QEMUD_CMD_FLAG_NAME);
>     DO_TEST("machine-aliases1", 0);
> --
> 1.6.6.rc4
>

You're right, all envvars copied in qemudBuildCommandLine should be
unset or set to known values in this testcase to make sure the test is
not affected by the actual envvar values.

But SDL_VIDEODRIVER is not copied in qemudBuildCommandLine and
QEMU_AUDIO_DRV is copied but not unset in the test.

I suggest the attached patch.

Matthias
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Unset-copied-environment-variables-in-qemuxml2argvtest.diff
Type: text/x-diff
Size: 2444 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20091228/e4aeb7db/attachment-0001.bin>


More information about the libvir-list mailing list