[libvirt PATCH 4/4] tests: Print fakerootdir when it's preserved

Andrea Bolognani abologna at redhat.com
Wed Mar 1 16:54:46 UTC 2023


Setting the LIBVIRT_SKIP_CLEANUP environment variable results
in the contents of fakerootdir being preserved for inspection.
Be more helpful towards the developer and print out the path
in this case.

Signed-off-by: Andrea Bolognani <abologna at redhat.com>
---
 tests/testutils.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/tests/testutils.c b/tests/testutils.c
index e717895fbf..e8cb8e6737 100644
--- a/tests/testutils.c
+++ b/tests/testutils.c
@@ -790,6 +790,8 @@ virTestFakeRootDirCleanup(char *fakerootdir)
 
     if (!g_getenv("LIBVIRT_SKIP_CLEANUP"))
         virFileDeleteTree(fakerootdir);
+    else
+        fprintf(stderr, "Test data ready for inspection: %s\n", fakerootdir);
 }
 
 int virTestMain(int argc,
-- 
2.39.2



More information about the libvir-list mailing list