From 12a73cf14aa49ac26e4f9bd84df933472721e9d9 Mon Sep 17 00:00:00 2001 From: Pavel Fedin Date: Wed, 30 Sep 2015 14:04:11 +0300 Subject: [PATCH] qemu: Add test cases for gic-version option These tests make sure that we can use this option only when the capability is set. Signed-off-by: Pavel Fedin --- .../qemuxml2argv-aarch64-gicv3.args | 7 +++++ .../qemuxml2argv-aarch64-gicv3.xml | 26 +++++++++++++++++++ tests/qemuxml2argvtest.c | 5 ++++ 3 files changed, 38 insertions(+) create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-aarch64-gicv3.args create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-aarch64-gicv3.xml diff --git a/tests/qemuxml2argvdata/qemuxml2argv-aarch64-gicv3.args b/tests/qemuxml2argvdata/qemuxml2argv-aarch64-gicv3.args new file mode 100644 index 0000000000..3d8732fa30 --- /dev/null +++ b/tests/qemuxml2argvdata/qemuxml2argv-aarch64-gicv3.args @@ -0,0 +1,7 @@ +LC_ALL=C PATH=/bin HOME=/home/test USER=test LOGNAME=test QEMU_AUDIO_DRV=none \ +/usr/bin/qemu-system-aarch64 -S -machine virt,accel=tcg,gic-version=3 \ +-cpu cortex-a53 -m 1024 -smp 1 \ +-nographic -nodefaults -monitor unix:/tmp/test-monitor,server,nowait -boot c \ +-kernel /aarch64.kernel -initrd /aarch64.initrd -append console=ttyAMA0 -usb \ +-net nic,macaddr=52:54:00:09:a4:37,vlan=0,model=virtio,name=net0 \ +-net user,vlan=0,name=hostnet0 diff --git a/tests/qemuxml2argvdata/qemuxml2argv-aarch64-gicv3.xml b/tests/qemuxml2argvdata/qemuxml2argv-aarch64-gicv3.xml new file mode 100644 index 0000000000..f8d63c3377 --- /dev/null +++ b/tests/qemuxml2argvdata/qemuxml2argv-aarch64-gicv3.xml @@ -0,0 +1,26 @@ + + aarch64test + 6ba410c5-1e5c-4d57-bee7-2228e7ffa32f + 1048576 + 1048576 + 1 + + + + + + cortex-a53 + + + hvm + /aarch64.kernel + /aarch64.initrd + console=ttyAMA0 + + + /usr/bin/qemu-system-aarch64 + + + + + diff --git a/tests/qemuxml2argvtest.c b/tests/qemuxml2argvtest.c index ae67779311..e6bf2f1786 100644 --- a/tests/qemuxml2argvtest.c +++ b/tests/qemuxml2argvtest.c @@ -1644,6 +1644,11 @@ mymain(void) QEMU_CAPS_CPU_HOST, QEMU_CAPS_KVM); DO_TEST("aarch64-gic", QEMU_CAPS_DEVICE, QEMU_CAPS_DRIVE, QEMU_CAPS_KVM); + DO_TEST("aarch64-gicv3", QEMU_CAPS_DEVICE, QEMU_CAPS_DRIVE, + QEMU_CAPS_KVM, QEMU_CAPS_MACHINE_OPT, + QEMU_CAPS_MACH_VIRT_GIC_VERSION); + DO_TEST_FAILURE("aarch64-gicv3", QEMU_CAPS_DEVICE, QEMU_CAPS_DRIVE, + QEMU_CAPS_KVM, QEMU_CAPS_MACHINE_OPT); driver.caps->host.cpu->arch = VIR_ARCH_AARCH64; DO_TEST("aarch64-kvm-32-on-64", QEMU_CAPS_DEVICE, QEMU_CAPS_DRIVE, -- 2.47.2