diff --git a/tests/commandtest.c b/tests/commandtest.c index 4a798fc91e0cbb3e67a20513f7a3385f05a0f6f2..dd6c24887d38cbee562a225c7e2de441f4f9536a 100644 --- a/tests/commandtest.c +++ b/tests/commandtest.c @@ -773,6 +773,13 @@ mymain(void) setpgid(0, 0); setsid(); + + /* Prime the debug/verbose settings from the env vars, + * since we're about to reset 'environ' */ + virTestGetDebug(); + virTestGetVerbose(); + + virInitialize(); /* Kill off any inherited fds that might interfere with our * testing. */ fd = 3; @@ -782,8 +789,6 @@ mymain(void) fd = 5; VIR_FORCE_CLOSE(fd); - virInitialize(); - environ = (char **)newenv; # define DO_TEST(NAME) \