mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-22 17:34:18 +03:00
qemuxml2argvtest: Update host arch for DO_TEST*ARCH* tests
To avoid mismatch between host and QEMU capabilities. Signed-off-by: Jiri Denemark <jdenemar@redhat.com> Reviewed-by: Ján Tomko <jtomko@redhat.com>
This commit is contained in:
parent
d8e1d39663
commit
30c6d99209
@ -699,9 +699,13 @@ mymain(void)
|
||||
__VA_ARGS__, ARG_END) < 0) \
|
||||
return EXIT_FAILURE; \
|
||||
testInfoSetPaths(&info, _suffix); \
|
||||
if (info.arch != VIR_ARCH_NONE && info.arch != VIR_ARCH_X86_64) \
|
||||
qemuTestSetHostArch(driver.caps, info.arch); \
|
||||
if (virTestRun("QEMU XML-2-ARGV " _name _suffix, \
|
||||
testCompareXMLToArgv, &info) < 0) \
|
||||
ret = -1; \
|
||||
if (info.arch != VIR_ARCH_NONE && info.arch != VIR_ARCH_X86_64) \
|
||||
qemuTestSetHostArch(driver.caps, VIR_ARCH_NONE); \
|
||||
testQemuInfoClear(&info); \
|
||||
} while (0)
|
||||
|
||||
|
@ -1058,16 +1058,16 @@ testQemuInfoSetArgs(struct testQemuInfo *info,
|
||||
if (!qemuCaps && capsarch && capsver) {
|
||||
bool stripmachinealiases = false;
|
||||
|
||||
info->arch = virArchFromString(capsarch);
|
||||
|
||||
if (STREQ(capsver, "latest")) {
|
||||
capsfile = g_strdup(virHashLookup(capslatest, capsarch));
|
||||
stripmachinealiases = true;
|
||||
} else capsfile = g_strdup_printf("%s/caps_%s.%s.xml",
|
||||
TEST_QEMU_CAPS_PATH, capsver, capsarch);
|
||||
|
||||
if (!(qemuCaps = qemuTestParseCapabilitiesArch(virArchFromString(capsarch),
|
||||
capsfile))) {
|
||||
if (!(qemuCaps = qemuTestParseCapabilitiesArch(info->arch, capsfile)))
|
||||
goto cleanup;
|
||||
}
|
||||
|
||||
if (stripmachinealiases)
|
||||
virQEMUCapsStripMachineAliases(qemuCaps);
|
||||
|
@ -63,6 +63,7 @@ struct testQemuInfo {
|
||||
int migrateFd;
|
||||
unsigned int flags;
|
||||
unsigned int parseFlags;
|
||||
virArch arch;
|
||||
};
|
||||
|
||||
virCapsPtr testQemuCapsInit(void);
|
||||
|
Loading…
Reference in New Issue
Block a user