提交 f32d4e3e 编写于 作者: C Cole Robinson

tests: qemuxml2argv: add testInfoClear

This is closer to the pattern of qemuxml2xml tests, and will make
things easier if we extend testInfo to contain more freeable data
Reviewed-by: NAndrea Bolognani <abologna@redhat.com>
Signed-off-by: NCole Robinson <crobinso@redhat.com>
上级 5eaaa106
......@@ -678,6 +678,12 @@ testInfoSetArgs(struct testInfo *info, ...)
return ret;
}
static void
testInfoClear(struct testInfo *info)
{
virObjectUnref(info->qemuCaps);
}
# define FAKEROOTDIRTEMPLATE abs_builddir "/fakerootdir-XXXXXX"
static int
......@@ -824,10 +830,9 @@ mymain(void)
if (virTestRun("QEMU XML-2-ARGV " _name "." arch "-" ver, \
testCompareXMLToArgv, &info) < 0) \
ret = -1; \
virObjectUnref(info.qemuCaps); \
testInfoClear(&info); \
} while (0)
# define DO_TEST_CAPS_ARCH_VER(name, arch, ver) \
DO_TEST_CAPS_INTERNAL(name, arch, ver, ARG_END)
......@@ -864,7 +869,7 @@ mymain(void)
if (virTestRun("QEMU XML-2-ARGV " _name, \
testCompareXMLToArgv, &info) < 0) \
ret = -1; \
virObjectUnref(info.qemuCaps); \
testInfoClear(&info); \
} while (0)
/* All the following macros require an explicit QEMU_CAPS_* list
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册