From aa506b462cc45183b38c8d24f8ae2675e5d268f7 Mon Sep 17 00:00:00 2001 From: Eric Blake Date: Thu, 10 Apr 2014 13:34:15 -0600 Subject: [PATCH] conf: make virstoragetest debug easier 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 --- tests/virstoragetest.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tests/virstoragetest.c b/tests/virstoragetest.c index 9a9b0d868f..b3fcd328cf 100644 --- a/tests/virstoragetest.c +++ b/tests/virstoragetest.c @@ -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. */