From: Eric Blake Date: Wed, 2 Apr 2014 21:52:18 +0000 (-0600) Subject: tests: simplify storage test cleanup X-Git-Tag: v1.2.4-rc1~195 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8feec44a0920c59b9151b78b53a8b5dfd1b4ffac;p=thirdparty%2Flibvirt.git tests: simplify storage test cleanup No need to spawn a child 'rm' process when we can do it ourselves. * tests/virstoragetest.c (testCleanupImages): Use dedicated helper. Signed-off-by: Eric Blake --- diff --git a/tests/virstoragetest.c b/tests/virstoragetest.c index 3089d70919..9ec39c78eb 100644 --- a/tests/virstoragetest.c +++ b/tests/virstoragetest.c @@ -62,8 +62,6 @@ static char *abslink2; static void testCleanupImages(void) { - virCommandPtr cmd; - VIR_FREE(qemuimg); VIR_FREE(absraw); VIR_FREE(canonraw); @@ -79,9 +77,7 @@ testCleanupImages(void) return; } - cmd = virCommandNewArgList("rm", "-rf", datadir, NULL); - ignore_value(virCommandRun(cmd, NULL)); - virCommandFree(cmd); + virFileDeleteTree(datadir); } static int