mirror of
https://github.com/libvirt/libvirt.git
synced 2026-10-02 12:20:06 -05:00
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 <eblake@redhat.com>
This commit is contained in:
1 parent
138e65c3be
commit
8feec44a09
1 file changed
+1
-5
@@ -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
|
||||
|
||||
Reference in new issue
Block a user