qenv[qenvc++] = envval; \
} while (0)
+ /* Make sure to unset or set all envvars in qemuxml2argvtest.c that
+ * are copied here using this macro, otherwise the test may fail */
#define ADD_ENV_COPY(envname) \
do { \
char *val = getenv(envname); \
#define DO_TEST(name, extraFlags) \
DO_TEST_FULL(name, extraFlags, NULL)
+ /* Unset or set all envvars here that are copied in qemudBuildCommandLine
+ * using ADD_ENV_COPY, otherwise these tests may fail due to unexpected
+ * values for these envvars */
setenv("PATH", "/bin", 1);
setenv("USER", "test", 1);
setenv("LOGNAME", "test", 1);
unsetenv("TMPDIR");
unsetenv("LD_PRELOAD");
unsetenv("LD_LIBRARY_PATH");
+ unsetenv("QEMU_AUDIO_DRV");
+ unsetenv("SDL_AUDIODRIVER");
DO_TEST("minimal", QEMUD_CMD_FLAG_NAME);
DO_TEST("machine-aliases1", 0);