From: Cole Robinson Date: Thu, 23 Apr 2015 17:47:06 +0000 (-0400) Subject: tests: qemu: Couple aarch64 CPU tests X-Git-Url: http://xenbits.xensource.com/gitweb?a=commitdiff_plain;h=7b9de914;p=people%2Fliuw%2Flibxenctrl-split%2Flibvirt.git tests: qemu: Couple aarch64 CPU tests - Make sure aarch64 host-passthrough works correctly - Make sure libvirt doesn't choke on cpu model=host, which is what virt-install/virt-manager were incorrectly specifying up until recently. --- diff --git a/tests/qemuxml2argvdata/qemuxml2argv-aarch64-cpu-model-host.args b/tests/qemuxml2argvdata/qemuxml2argv-aarch64-cpu-model-host.args new file mode 100644 index 000000000..72e652607 --- /dev/null +++ b/tests/qemuxml2argvdata/qemuxml2argv-aarch64-cpu-model-host.args @@ -0,0 +1,5 @@ +LC_ALL=C PATH=/bin HOME=/home/test USER=test LOGNAME=test QEMU_AUDIO_DRV=none \ +/usr/bin/qemu-system-aarch64 -S -M virt -cpu host -m 1024 -smp 1 -nographic \ +-nodefconfig -nodefaults -monitor unix:/tmp/test-monitor,server,nowait \ +-boot c -usb -drive file=/aarch64.raw,if=none,id=drive-virtio-disk0 \ +-device virtio-blk-device,drive=drive-virtio-disk0,id=virtio-disk0 diff --git a/tests/qemuxml2argvdata/qemuxml2argv-aarch64-cpu-model-host.xml b/tests/qemuxml2argvdata/qemuxml2argv-aarch64-cpu-model-host.xml new file mode 100644 index 000000000..53d528f29 --- /dev/null +++ b/tests/qemuxml2argvdata/qemuxml2argv-aarch64-cpu-model-host.xml @@ -0,0 +1,28 @@ + + aarch64test + 496d7ea8-9739-544b-4ebd-ef08be936e8b + 1048576 + 1048576 + 1 + + hvm + + + + + + + + + + destroy + restart + restart + + /usr/bin/qemu-system-aarch64 + + + + + + diff --git a/tests/qemuxml2argvdata/qemuxml2argv-aarch64-cpu-passthrough.args b/tests/qemuxml2argvdata/qemuxml2argv-aarch64-cpu-passthrough.args new file mode 100644 index 000000000..72e652607 --- /dev/null +++ b/tests/qemuxml2argvdata/qemuxml2argv-aarch64-cpu-passthrough.args @@ -0,0 +1,5 @@ +LC_ALL=C PATH=/bin HOME=/home/test USER=test LOGNAME=test QEMU_AUDIO_DRV=none \ +/usr/bin/qemu-system-aarch64 -S -M virt -cpu host -m 1024 -smp 1 -nographic \ +-nodefconfig -nodefaults -monitor unix:/tmp/test-monitor,server,nowait \ +-boot c -usb -drive file=/aarch64.raw,if=none,id=drive-virtio-disk0 \ +-device virtio-blk-device,drive=drive-virtio-disk0,id=virtio-disk0 diff --git a/tests/qemuxml2argvdata/qemuxml2argv-aarch64-cpu-passthrough.xml b/tests/qemuxml2argvdata/qemuxml2argv-aarch64-cpu-passthrough.xml new file mode 100644 index 000000000..4cdf387f3 --- /dev/null +++ b/tests/qemuxml2argvdata/qemuxml2argv-aarch64-cpu-passthrough.xml @@ -0,0 +1,27 @@ + + aarch64test + 496d7ea8-9739-544b-4ebd-ef08be936e8b + 1048576 + 1048576 + 1 + + hvm + + + + + + + + + destroy + restart + restart + + /usr/bin/qemu-system-aarch64 + + + + + + diff --git a/tests/qemuxml2argvtest.c b/tests/qemuxml2argvtest.c index 1fe445a3d..055ceee48 100644 --- a/tests/qemuxml2argvtest.c +++ b/tests/qemuxml2argvtest.c @@ -1525,6 +1525,12 @@ mymain(void) DO_TEST("aarch64-virt-default-nic", QEMU_CAPS_DEVICE, QEMU_CAPS_NODEFCONFIG, QEMU_CAPS_DEVICE_VIRTIO_MMIO); + DO_TEST("aarch64-cpu-passthrough", QEMU_CAPS_DEVICE, QEMU_CAPS_DRIVE, + QEMU_CAPS_NODEFCONFIG, QEMU_CAPS_DEVICE_VIRTIO_MMIO, + QEMU_CAPS_CPU_HOST, QEMU_CAPS_KVM); + DO_TEST("aarch64-cpu-model-host", QEMU_CAPS_DEVICE, QEMU_CAPS_DRIVE, + QEMU_CAPS_NODEFCONFIG, QEMU_CAPS_DEVICE_VIRTIO_MMIO, + QEMU_CAPS_CPU_HOST, QEMU_CAPS_KVM); DO_TEST("kvm-pit-device", QEMU_CAPS_KVM_PIT_TICK_POLICY); DO_TEST("kvm-pit-delay", QEMU_CAPS_NO_KVM_PIT); diff --git a/tests/qemuxml2xmloutdata/qemuxml2argv-aarch64-cpu-passthrough.xml b/tests/qemuxml2xmloutdata/qemuxml2argv-aarch64-cpu-passthrough.xml new file mode 100644 index 000000000..4cdf387f3 --- /dev/null +++ b/tests/qemuxml2xmloutdata/qemuxml2argv-aarch64-cpu-passthrough.xml @@ -0,0 +1,27 @@ + + aarch64test + 496d7ea8-9739-544b-4ebd-ef08be936e8b + 1048576 + 1048576 + 1 + + hvm + + + + + + + + + destroy + restart + restart + + /usr/bin/qemu-system-aarch64 + + + + + + diff --git a/tests/qemuxml2xmltest.c b/tests/qemuxml2xmltest.c index bce04b24c..45464cc6a 100644 --- a/tests/qemuxml2xmltest.c +++ b/tests/qemuxml2xmltest.c @@ -612,6 +612,8 @@ mymain(void) DO_TEST("memory-hotplug-nonuma"); DO_TEST("memory-hotplug-dimm"); + DO_TEST("aarch64-cpu-model-host"); + virObjectUnref(driver.caps); virObjectUnref(driver.xmlopt);