提交 646eb207 编写于 作者: C Cole Robinson

tests: qemuxml2argv: break apart testInitQEMUCaps

Reviewed-by: NAndrea Bolognani <abologna@redhat.com>
Signed-off-by: NCole Robinson <crobinso@redhat.com>
上级 c1202cbc
...@@ -378,25 +378,6 @@ testAddCPUModels(virQEMUCapsPtr caps, bool skipLegacy) ...@@ -378,25 +378,6 @@ testAddCPUModels(virQEMUCapsPtr caps, bool skipLegacy)
} }
static int
testInitQEMUCaps(struct testInfo *info,
int gic)
{
int ret = -1;
if (!(info->qemuCaps = virQEMUCapsNew()))
goto cleanup;
if (testQemuCapsSetGIC(info->qemuCaps, gic) < 0)
goto cleanup;
ret = 0;
cleanup:
return ret;
}
static int static int
testUpdateQEMUCaps(const struct testInfo *info, testUpdateQEMUCaps(const struct testInfo *info,
virDomainObjPtr vm, virDomainObjPtr vm,
...@@ -853,7 +834,9 @@ mymain(void) ...@@ -853,7 +834,9 @@ mymain(void)
static struct testInfo info = { \ static struct testInfo info = { \
name, NULL, NULL, migrateFrom, migrateFd, (flags), parseFlags, \ name, NULL, NULL, migrateFrom, migrateFd, (flags), parseFlags, \
}; \ }; \
if (testInitQEMUCaps(&info, gic) < 0) \ if (!(info.qemuCaps = virQEMUCapsNew())) \
return EXIT_FAILURE; \
if (testQemuCapsSetGIC(info.qemuCaps, gic) < 0) \
return EXIT_FAILURE; \ return EXIT_FAILURE; \
if (testInfoSetArgs(&info, __VA_ARGS__, QEMU_CAPS_LAST, ARG_END) < 0) \ if (testInfoSetArgs(&info, __VA_ARGS__, QEMU_CAPS_LAST, ARG_END) < 0) \
return EXIT_FAILURE; \ return EXIT_FAILURE; \
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册