提交 6bb5f0b2 编写于 作者: J Jiri Denemark

qemuxml2argvtest: Properly initialize qemuCaps->arch

qemuCaps->arch should match the guest architecture from domain XML.
Signed-off-by: NJiri Denemark <jdenemar@redhat.com>
上级 4df4b8de
......@@ -2250,6 +2250,15 @@ const char *virQEMUCapsGetBinary(virQEMUCapsPtr qemuCaps)
return qemuCaps->binary;
}
void
virQEMUCapsSetArch(virQEMUCapsPtr qemuCaps,
virArch arch)
{
qemuCaps->arch = arch;
}
virArch virQEMUCapsGetArch(virQEMUCapsPtr qemuCaps)
{
return qemuCaps->arch;
......
......@@ -56,4 +56,7 @@ char *virQEMUCapsFormatCache(virQEMUCapsPtr qemuCaps,
time_t selfCTime,
unsigned long selfVersion);
void
virQEMUCapsSetArch(virQEMUCapsPtr qemuCaps,
virArch arch);
#endif
......@@ -27,6 +27,10 @@
# include "storage/storage_driver.h"
# include "virmock.h"
# define __QEMU_CAPSRIV_H_ALLOW__
# include "qemu/qemu_capspriv.h"
# undef __QEMU_CAPSRIV_H_ALLOW__
# include "testutilsqemu.h"
# define VIR_FROM_THIS VIR_FROM_QEMU
......@@ -332,6 +336,8 @@ testUpdateQEMUCaps(const struct testInfo *info,
{
int ret = -1;
virQEMUCapsSetArch(info->qemuCaps, vm->def->os.arch);
if (testAddCPUModels(info->qemuCaps, info->skipLegacyCPUs) < 0)
goto cleanup;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册