]> xenbits.xensource.com Git - libvirt.git/commitdiff
conf: make virstoragetest debug easier
authorEric Blake <eblake@redhat.com>
Thu, 10 Apr 2014 19:34:15 +0000 (13:34 -0600)
committerEric Blake <eblake@redhat.com>
Thu, 10 Apr 2014 21:47:58 +0000 (15:47 -0600)
I'm tired of alternating between test failures due to bugs in
my refactoring work, vs. test failures due to leftovers in
the file system from the previous test.  This patch has no
impact when the testsuite is successful, but doeesn't hurt either.

* tests/virstoragetest.c (testPrepImages): Clean up from prior
failed test.

Signed-off-by: Eric Blake <eblake@redhat.com>
tests/virstoragetest.c

index 9a9b0d868f936aceae3379695830c4d0330ee5de..b3fcd328cfb197605d0c732f5da3db232ef5a2b3 100644 (file)
@@ -102,6 +102,9 @@ testPrepImages(void)
     if (!qemuimg)
         goto skip;
 
+    /* Clean up from any earlier failed tests */
+    virFileDeleteTree(datadir);
+
     /* See if qemu-img supports '-o compat=xxx'.  If so, we force the
      * use of both v2 and v3 files; if not, it is v2 only but the test
      * still works. */