]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
qemuxml2argvtest: Don't overwrite driver stateDir
authorMichal Privoznik <mprivozn@redhat.com>
Fri, 10 Mar 2017 08:55:43 +0000 (09:55 +0100)
committerMichal Privoznik <mprivozn@redhat.com>
Fri, 10 Mar 2017 08:55:43 +0000 (09:55 +0100)
This is a very historic artefact. Back in the old days of
830ba76c3e when we had macros to add arguments onto qemu command
line (!) we thought it was a good idea to let qemu write out the
PID file. So we passed -pidfile $stateDir/$domName onto the
command line. Thus, in order for tests to work we needed stable
stateDir in the qemu driver. Unfortunately, after 16efa11aa696
where stateDir is mkdtemp()-d, this approach lead to a leak of
temp dir.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
tests/qemuxml2argvtest.c

index d2d267fce0c135aae1e5687cd2e2d81b9968be59..00b0e25cdab1c5f6758197b2338a72e098145fe7 100644 (file)
@@ -581,9 +581,6 @@ mymain(void)
     if (VIR_STRDUP_QUIET(driver.config->chardevTLSx509certdir, "/etc/pki/libvirt-chardev") < 0)
         return EXIT_FAILURE;
 
-    VIR_FREE(driver.config->stateDir);
-    if (VIR_STRDUP_QUIET(driver.config->stateDir, "/nowhere") < 0)
-        return EXIT_FAILURE;
     VIR_FREE(driver.config->hugetlbfs);
     if (VIR_ALLOC_N(driver.config->hugetlbfs, 2) < 0)
         return EXIT_FAILURE;