提交 30c6d992 编写于 作者: J Jiri Denemark

qemuxml2argvtest: Update host arch for DO_TEST*ARCH* tests

To avoid mismatch between host and QEMU capabilities.
Signed-off-by: NJiri Denemark <jdenemar@redhat.com>
Reviewed-by: NJán Tomko <jtomko@redhat.com>
上级 d8e1d396
......@@ -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);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册