mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-23 06:05:27 +00:00
tests: qemuxml2argv: break apart testInitQEMUCaps
Reviewed-by: Andrea Bolognani <abologna@redhat.com> Signed-off-by: Cole Robinson <crobinso@redhat.com>
This commit is contained in:
parent
c1202cbc92
commit
646eb207eb
@ -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
|
||||
testUpdateQEMUCaps(const struct testInfo *info,
|
||||
virDomainObjPtr vm,
|
||||
@ -853,7 +834,9 @@ mymain(void)
|
||||
static struct testInfo info = { \
|
||||
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; \
|
||||
if (testInfoSetArgs(&info, __VA_ARGS__, QEMU_CAPS_LAST, ARG_END) < 0) \
|
||||
return EXIT_FAILURE; \
|
||||
|
Loading…
Reference in New Issue
Block a user