From 8feec44a0920c59b9151b78b53a8b5dfd1b4ffac Mon Sep 17 00:00:00 2001 From: Eric Blake Date: Wed, 2 Apr 2014 15:52:18 -0600 Subject: [PATCH] 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 --- tests/virstoragetest.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) 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 -- 2.39.5