mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-07-06 09:55:46 +00:00
tests: avoid littering /tmp
Running 'make -C tests check TESTS=qemuagenttest' left a directory /tmp/libvirt_XXXXXX/ behind. The culprit was failure to cleanup when short-circuiting an expensive test. * tests/qemuagenttest.c (testQemuAgentTimeout): Free resources when skipping expensive test. Signed-off-by: Eric Blake <eblake@redhat.com>
This commit is contained in:
parent
8f10c1e77f
commit
8277211300
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (C) 2013 Red Hat, Inc.
|
* Copyright (C) 2013, 2014 Red Hat, Inc.
|
||||||
*
|
*
|
||||||
* This library is free software; you can redistribute it and/or
|
* This library is free software; you can redistribute it and/or
|
||||||
* modify it under the terms of the GNU Lesser General Public
|
* modify it under the terms of the GNU Lesser General Public
|
||||||
@ -538,8 +538,10 @@ testQemuAgentTimeout(const void *data)
|
|||||||
if (!test)
|
if (!test)
|
||||||
return -1;
|
return -1;
|
||||||
|
|
||||||
if (virTestGetExpensive() == 0)
|
if (virTestGetExpensive() == 0) {
|
||||||
return EXIT_AM_SKIP;
|
ret = EXIT_AM_SKIP;
|
||||||
|
goto cleanup;
|
||||||
|
}
|
||||||
|
|
||||||
if (qemuMonitorTestAddHandler(test, qemuAgentTimeoutTestMonitorHandler,
|
if (qemuMonitorTestAddHandler(test, qemuAgentTimeoutTestMonitorHandler,
|
||||||
NULL, NULL) < 0)
|
NULL, NULL) < 0)
|
||||||
|
Loading…
Reference in New Issue
Block a user