qemuxml2argvtest: Set correct architecture for KVM guests

Testing PPC64/AArch64 KVM domains on x86_64 host only works because we
have a lot of bugs in our code. Since this series is going to fix them,
we need to make sure the host architecture matches guest for KVM
domains.

Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
This commit is contained in:
Jiri Denemark 2016-08-04 13:19:39 +02:00
parent b89fa6d1b6
commit d029f9a0db

View File

@ -1535,10 +1535,14 @@ mymain(void)
QEMU_CAPS_NODEFCONFIG); QEMU_CAPS_NODEFCONFIG);
DO_TEST("pseries-cpu-exact", QEMU_CAPS_CHARDEV, DO_TEST("pseries-cpu-exact", QEMU_CAPS_CHARDEV,
QEMU_CAPS_NODEFCONFIG); QEMU_CAPS_NODEFCONFIG);
qemuTestSetHostArch(driver.caps, VIR_ARCH_PPC64);
DO_TEST("pseries-cpu-compat", QEMU_CAPS_KVM, DO_TEST("pseries-cpu-compat", QEMU_CAPS_KVM,
QEMU_CAPS_CHARDEV, QEMU_CAPS_NODEFCONFIG); QEMU_CAPS_CHARDEV, QEMU_CAPS_NODEFCONFIG);
DO_TEST("pseries-cpu-le", QEMU_CAPS_KVM, DO_TEST("pseries-cpu-le", QEMU_CAPS_KVM,
QEMU_CAPS_CHARDEV, QEMU_CAPS_NODEFCONFIG); QEMU_CAPS_CHARDEV, QEMU_CAPS_NODEFCONFIG);
qemuTestSetHostArch(driver.caps, VIR_ARCH_NONE);
DO_TEST("pseries-panic-missing", DO_TEST("pseries-panic-missing",
QEMU_CAPS_CHARDEV, QEMU_CAPS_NODEFCONFIG); QEMU_CAPS_CHARDEV, QEMU_CAPS_NODEFCONFIG);
DO_TEST("pseries-panic-no-address", DO_TEST("pseries-panic-no-address",
@ -1906,6 +1910,7 @@ mymain(void)
DO_TEST("aarch64-virt-default-nic", DO_TEST("aarch64-virt-default-nic",
QEMU_CAPS_NODEFCONFIG, QEMU_CAPS_NODEFCONFIG,
QEMU_CAPS_DEVICE_VIRTIO_MMIO); QEMU_CAPS_DEVICE_VIRTIO_MMIO);
qemuTestSetHostArch(driver.caps, VIR_ARCH_AARCH64);
DO_TEST("aarch64-cpu-passthrough", DO_TEST("aarch64-cpu-passthrough",
QEMU_CAPS_NODEFCONFIG, QEMU_CAPS_DEVICE_VIRTIO_MMIO, QEMU_CAPS_NODEFCONFIG, QEMU_CAPS_DEVICE_VIRTIO_MMIO,
QEMU_CAPS_KVM); QEMU_CAPS_KVM);
@ -1988,8 +1993,6 @@ mymain(void)
DO_TEST_FAILURE("aarch64-gic-not-arm", DO_TEST_FAILURE("aarch64-gic-not-arm",
QEMU_CAPS_KVM, QEMU_CAPS_MACHINE_OPT, QEMU_CAPS_KVM, QEMU_CAPS_MACHINE_OPT,
QEMU_CAPS_MACH_VIRT_GIC_VERSION); QEMU_CAPS_MACH_VIRT_GIC_VERSION);
qemuTestSetHostArch(driver.caps, VIR_ARCH_AARCH64);
DO_TEST("aarch64-kvm-32-on-64", DO_TEST("aarch64-kvm-32-on-64",
QEMU_CAPS_NODEFCONFIG, QEMU_CAPS_DEVICE_VIRTIO_MMIO, QEMU_CAPS_NODEFCONFIG, QEMU_CAPS_DEVICE_VIRTIO_MMIO,
QEMU_CAPS_KVM, QEMU_CAPS_CPU_AARCH64_OFF); QEMU_CAPS_KVM, QEMU_CAPS_CPU_AARCH64_OFF);