From: Andrea Bolognani Date: Wed, 3 Feb 2016 15:58:20 +0000 (+0100) Subject: tests: Reorganize and simplify GIC test cases X-Git-Url: http://xenbits.xensource.com/gitweb?a=commitdiff_plain;h=161a341850c70f41aef81bec15b52a360f10339e;p=libvirt.git tests: Reorganize and simplify GIC test cases Unify the naming to prepare for new test cases that will be added later on. Convert a couple of output XML files for the qemuxml2xml test to symlinks while at it, since they were identical to the corresponding input XML files anyways. Moreover, since we're only interested in testing GIC support here, simplify XML files by getting rid of the unrelevant bits. --- diff --git a/tests/qemuxml2argvdata/qemuxml2argv-aarch64-gic-v2.args b/tests/qemuxml2argvdata/qemuxml2argv-aarch64-gic-v2.args new file mode 100644 index 0000000000..d30f4493b2 --- /dev/null +++ b/tests/qemuxml2argvdata/qemuxml2argv-aarch64-gic-v2.args @@ -0,0 +1,20 @@ +LC_ALL=C \ +PATH=/bin \ +HOME=/home/test \ +USER=test \ +LOGNAME=test \ +QEMU_AUDIO_DRV=none \ +/usr/bin/qemu-system-aarch64 \ +-name aarch64test \ +-S \ +-machine virt,accel=kvm \ +-cpu host \ +-m 1024 \ +-smp 1 \ +-uuid 6ba410c5-1e5c-4d57-bee7-2228e7ffa32f \ +-nographic \ +-nodefaults \ +-monitor unix:/tmp/test-monitor,server,nowait \ +-no-acpi \ +-boot c \ +-usb diff --git a/tests/qemuxml2argvdata/qemuxml2argv-aarch64-gic-v2.xml b/tests/qemuxml2argvdata/qemuxml2argv-aarch64-gic-v2.xml new file mode 100644 index 0000000000..9ccba99042 --- /dev/null +++ b/tests/qemuxml2argvdata/qemuxml2argv-aarch64-gic-v2.xml @@ -0,0 +1,22 @@ + + aarch64test + 6ba410c5-1e5c-4d57-bee7-2228e7ffa32f + 1048576 + 1048576 + 1 + + hvm + + + + + + + + destroy + restart + destroy + + /usr/bin/qemu-system-aarch64 + + diff --git a/tests/qemuxml2argvdata/qemuxml2argv-aarch64-gic-v3.args b/tests/qemuxml2argvdata/qemuxml2argv-aarch64-gic-v3.args new file mode 100644 index 0000000000..9cd86acc67 --- /dev/null +++ b/tests/qemuxml2argvdata/qemuxml2argv-aarch64-gic-v3.args @@ -0,0 +1,20 @@ +LC_ALL=C \ +PATH=/bin \ +HOME=/home/test \ +USER=test \ +LOGNAME=test \ +QEMU_AUDIO_DRV=none \ +/usr/bin/qemu-system-aarch64 \ +-name aarch64test \ +-S \ +-machine virt,accel=kvm,gic-version=3 \ +-cpu host \ +-m 1024 \ +-smp 1 \ +-uuid 6ba410c5-1e5c-4d57-bee7-2228e7ffa32f \ +-nographic \ +-nodefaults \ +-monitor unix:/tmp/test-monitor,server,nowait \ +-no-acpi \ +-boot c \ +-usb diff --git a/tests/qemuxml2argvdata/qemuxml2argv-aarch64-gic-v3.xml b/tests/qemuxml2argvdata/qemuxml2argv-aarch64-gic-v3.xml new file mode 100644 index 0000000000..7c9ee92b39 --- /dev/null +++ b/tests/qemuxml2argvdata/qemuxml2argv-aarch64-gic-v3.xml @@ -0,0 +1,22 @@ + + aarch64test + 6ba410c5-1e5c-4d57-bee7-2228e7ffa32f + 1048576 + 1048576 + 1 + + hvm + + + + + + + + destroy + restart + destroy + + /usr/bin/qemu-system-aarch64 + + diff --git a/tests/qemuxml2argvdata/qemuxml2argv-aarch64-gic.args b/tests/qemuxml2argvdata/qemuxml2argv-aarch64-gic.args deleted file mode 100644 index be19ea4e16..0000000000 --- a/tests/qemuxml2argvdata/qemuxml2argv-aarch64-gic.args +++ /dev/null @@ -1,25 +0,0 @@ -LC_ALL=C \ -PATH=/bin \ -HOME=/home/test \ -USER=test \ -LOGNAME=test \ -QEMU_AUDIO_DRV=none \ -/usr/bin/qemu-system-aarch64 \ --name aarch64test \ --S \ --M virt \ --no-kvm \ --cpu cortex-a53 \ --m 1024 \ --smp 1 \ --uuid 6ba410c5-1e5c-4d57-bee7-2228e7ffa32f \ --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-gic.xml b/tests/qemuxml2argvdata/qemuxml2argv-aarch64-gic.xml deleted file mode 100644 index cb595e4a7a..0000000000 --- a/tests/qemuxml2argvdata/qemuxml2argv-aarch64-gic.xml +++ /dev/null @@ -1,32 +0,0 @@ - - aarch64test - 6ba410c5-1e5c-4d57-bee7-2228e7ffa32f - 1048576 - 1048576 - 1 - - hvm - /aarch64.kernel - /aarch64.initrd - console=ttyAMA0 - - - - - - - - cortex-a53 - - - destroy - restart - destroy - - /usr/bin/qemu-system-aarch64 - - - - - - diff --git a/tests/qemuxml2argvdata/qemuxml2argv-aarch64-gicv3.args b/tests/qemuxml2argvdata/qemuxml2argv-aarch64-gicv3.args deleted file mode 100644 index a3530bbc0d..0000000000 --- a/tests/qemuxml2argvdata/qemuxml2argv-aarch64-gicv3.args +++ /dev/null @@ -1,24 +0,0 @@ -LC_ALL=C \ -PATH=/bin \ -HOME=/home/test \ -USER=test \ -LOGNAME=test \ -QEMU_AUDIO_DRV=none \ -/usr/bin/qemu-system-aarch64 \ --name aarch64test \ --S \ --machine virt,accel=tcg,gic-version=3 \ --cpu cortex-a53 \ --m 1024 \ --smp 1 \ --uuid 6ba410c5-1e5c-4d57-bee7-2228e7ffa32f \ --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 deleted file mode 100644 index 72aaaf7fe5..0000000000 --- a/tests/qemuxml2argvdata/qemuxml2argv-aarch64-gicv3.xml +++ /dev/null @@ -1,32 +0,0 @@ - - aarch64test - 6ba410c5-1e5c-4d57-bee7-2228e7ffa32f - 1048576 - 1048576 - 1 - - hvm - /aarch64.kernel - /aarch64.initrd - console=ttyAMA0 - - - - - - - - cortex-a53 - - - destroy - restart - destroy - - /usr/bin/qemu-system-aarch64 - - - - - - diff --git a/tests/qemuxml2argvtest.c b/tests/qemuxml2argvtest.c index 3c7693bf25..360ba25c79 100644 --- a/tests/qemuxml2argvtest.c +++ b/tests/qemuxml2argvtest.c @@ -1679,13 +1679,14 @@ mymain(void) DO_TEST("aarch64-cpu-passthrough", QEMU_CAPS_NODEFCONFIG, QEMU_CAPS_DEVICE_VIRTIO_MMIO, QEMU_CAPS_CPU_HOST, QEMU_CAPS_KVM); - DO_TEST("aarch64-gic", - QEMU_CAPS_KVM); - DO_TEST("aarch64-gicv3", - QEMU_CAPS_KVM, QEMU_CAPS_MACHINE_OPT, + DO_TEST("aarch64-gic-v2", + QEMU_CAPS_KVM, QEMU_CAPS_MACHINE_OPT, QEMU_CAPS_CPU_HOST, QEMU_CAPS_MACH_VIRT_GIC_VERSION); - DO_TEST_FAILURE("aarch64-gicv3", - QEMU_CAPS_KVM, QEMU_CAPS_MACHINE_OPT); + DO_TEST("aarch64-gic-v3", + QEMU_CAPS_KVM, QEMU_CAPS_MACHINE_OPT, QEMU_CAPS_CPU_HOST, + QEMU_CAPS_MACH_VIRT_GIC_VERSION); + DO_TEST_FAILURE("aarch64-gic-v3", + QEMU_CAPS_KVM, QEMU_CAPS_MACHINE_OPT, QEMU_CAPS_CPU_HOST); driver.caps->host.cpu->arch = VIR_ARCH_AARCH64; DO_TEST("aarch64-kvm-32-on-64", diff --git a/tests/qemuxml2xmloutdata/qemuxml2xmlout-aarch64-gic-v2.xml b/tests/qemuxml2xmloutdata/qemuxml2xmlout-aarch64-gic-v2.xml new file mode 120000 index 0000000000..80a01c2185 --- /dev/null +++ b/tests/qemuxml2xmloutdata/qemuxml2xmlout-aarch64-gic-v2.xml @@ -0,0 +1 @@ +../qemuxml2argvdata/qemuxml2argv-aarch64-gic-v2.xml \ No newline at end of file diff --git a/tests/qemuxml2xmloutdata/qemuxml2xmlout-aarch64-gic-v3.xml b/tests/qemuxml2xmloutdata/qemuxml2xmlout-aarch64-gic-v3.xml new file mode 120000 index 0000000000..f586fa1954 --- /dev/null +++ b/tests/qemuxml2xmloutdata/qemuxml2xmlout-aarch64-gic-v3.xml @@ -0,0 +1 @@ +../qemuxml2argvdata/qemuxml2argv-aarch64-gic-v3.xml \ No newline at end of file diff --git a/tests/qemuxml2xmloutdata/qemuxml2xmlout-aarch64-gic.xml b/tests/qemuxml2xmloutdata/qemuxml2xmlout-aarch64-gic.xml deleted file mode 100644 index cb595e4a7a..0000000000 --- a/tests/qemuxml2xmloutdata/qemuxml2xmlout-aarch64-gic.xml +++ /dev/null @@ -1,32 +0,0 @@ - - aarch64test - 6ba410c5-1e5c-4d57-bee7-2228e7ffa32f - 1048576 - 1048576 - 1 - - hvm - /aarch64.kernel - /aarch64.initrd - console=ttyAMA0 - - - - - - - - cortex-a53 - - - destroy - restart - destroy - - /usr/bin/qemu-system-aarch64 - - - - - - diff --git a/tests/qemuxml2xmloutdata/qemuxml2xmlout-aarch64-gicv3.xml b/tests/qemuxml2xmloutdata/qemuxml2xmlout-aarch64-gicv3.xml deleted file mode 100644 index 72aaaf7fe5..0000000000 --- a/tests/qemuxml2xmloutdata/qemuxml2xmlout-aarch64-gicv3.xml +++ /dev/null @@ -1,32 +0,0 @@ - - aarch64test - 6ba410c5-1e5c-4d57-bee7-2228e7ffa32f - 1048576 - 1048576 - 1 - - hvm - /aarch64.kernel - /aarch64.initrd - console=ttyAMA0 - - - - - - - - cortex-a53 - - - destroy - restart - destroy - - /usr/bin/qemu-system-aarch64 - - - - - - diff --git a/tests/qemuxml2xmltest.c b/tests/qemuxml2xmltest.c index d9550ccee8..b13e2bd95d 100644 --- a/tests/qemuxml2xmltest.c +++ b/tests/qemuxml2xmltest.c @@ -737,8 +737,8 @@ mymain(void) QEMU_CAPS_DEVICE_VIRTIO_RNG, QEMU_CAPS_OBJECT_RNG_RANDOM, QEMU_CAPS_OBJECT_GPEX, QEMU_CAPS_DEVICE_PCI_BRIDGE, QEMU_CAPS_DEVICE_DMI_TO_PCI_BRIDGE, QEMU_CAPS_VIRTIO_SCSI); - DO_TEST("aarch64-gic"); - DO_TEST("aarch64-gicv3"); + DO_TEST("aarch64-gic-v2"); + DO_TEST("aarch64-gic-v3"); DO_TEST("memory-hotplug"); DO_TEST("memory-hotplug-nonuma");