提交 82772113 编写于 作者: E Eric Blake

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: NEric Blake <eblake@redhat.com>
上级 8f10c1e7
/*
* Copyright (C) 2013 Red Hat, Inc.
* Copyright (C) 2013, 2014 Red Hat, Inc.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
......@@ -538,8 +538,10 @@ testQemuAgentTimeout(const void *data)
if (!test)
return -1;
if (virTestGetExpensive() == 0)
return EXIT_AM_SKIP;
if (virTestGetExpensive() == 0) {
ret = EXIT_AM_SKIP;
goto cleanup;
}
if (qemuMonitorTestAddHandler(test, qemuAgentTimeoutTestMonitorHandler,
NULL, NULL) < 0)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册