mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-23 21:34:54 +03:00
qemuxml2argvtest: Properly initialize qemuCaps->arch
qemuCaps->arch should match the guest architecture from domain XML. Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
This commit is contained in:
parent
4df4b8dea3
commit
6bb5f0b218
@ -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;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user