[PATCH] tests: remove hostdevmgr directory on cleanup

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Signed-off-by: Martin Kletzander <mkletzan@xxxxxxxxxx>
---
 tests/virhostdevtest.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/tests/virhostdevtest.c b/tests/virhostdevtest.c
index 089014e..de4cdde 100644
--- a/tests/virhostdevtest.c
+++ b/tests/virhostdevtest.c
@@ -65,6 +65,9 @@ myCleanup(void)
     }

     if (mgr) {
+        if (mgr->stateDir && !getenv("LIBVIRT_SKIP_CLEANUP"))
+            virFileDeleteTree(mgr->stateDir);
+
         virObjectUnref(mgr->activePCIHostdevs);
         virObjectUnref(mgr->inactivePCIHostdevs);
         virObjectUnref(mgr->activeUSBHostdevs);
-- 
1.9.2

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list




[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]