From: Cole Robinson Date: Wed, 27 Jan 2016 22:47:14 +0000 (-0500) Subject: tests: qemu: More aarch64 virtio and pci tests X-Git-Url: http://xenbits.xensource.com/gitweb?a=commitdiff_plain;h=5a1ccaeb00d3cba7727b7022587f77b4fd2edd2b;p=libvirt.git tests: qemu: More aarch64 virtio and pci tests Clarify the point of some of the test cases by renaming them. Add more xml2xml tests. --- diff --git a/tests/qemuxml2argvdata/qemuxml2argv-aarch64-mmio-default-pci.args b/tests/qemuxml2argvdata/qemuxml2argv-aarch64-mmio-default-pci.args deleted file mode 100644 index a49bc82b0f..0000000000 --- a/tests/qemuxml2argvdata/qemuxml2argv-aarch64-mmio-default-pci.args +++ /dev/null @@ -1,37 +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 \ --cpu cortex-a53 \ --m 1024 \ --smp 1 \ --uuid 496d7ea8-9739-544b-4ebd-ef08be936e8b \ --nographic \ --nodefconfig \ --nodefaults \ --monitor unix:/tmp/test-monitor,server,nowait \ --boot c \ --kernel /aarch64.kernel \ --initrd /aarch64.initrd \ --append 'earlyprintk console=ttyAMA0,115200n8 rw root=/dev/vda rootwait' \ --dtb /aarch64.dtb \ --device i82801b11-bridge,id=pci.1,bus=pcie.0,addr=0x1 \ --device pci-bridge,chassis_nr=2,id=pci.2,bus=pci.1,addr=0x1 \ --device virtio-serial-device,id=virtio-serial0 \ --usb \ --drive file=/aarch64.raw,format=raw,if=none,id=drive-virtio-disk0 \ --device virtio-blk-device,drive=drive-virtio-disk0,id=virtio-disk0 \ --device virtio-net-device,vlan=0,id=net0,mac=52:54:00:09:a4:37 \ --net user,vlan=0,name=hostnet0 \ --serial pty \ --chardev pty,id=charconsole1 \ --device virtconsole,chardev=charconsole1,id=console1 \ --device virtio-balloon-device,id=balloon0 \ --object rng-random,id=objrng0,filename=/dev/random \ --device virtio-rng-device,rng=objrng0,id=rng0 diff --git a/tests/qemuxml2argvdata/qemuxml2argv-aarch64-mmio-default-pci.xml b/tests/qemuxml2argvdata/qemuxml2argv-aarch64-mmio-default-pci.xml deleted file mode 100644 index ad34615128..0000000000 --- a/tests/qemuxml2argvdata/qemuxml2argv-aarch64-mmio-default-pci.xml +++ /dev/null @@ -1,48 +0,0 @@ - - aarch64test - 496d7ea8-9739-544b-4ebd-ef08be936e8b - 1048576 - 1048576 - 1 - - hvm - /aarch64.kernel - /aarch64.initrd - /aarch64.dtb - earlyprintk console=ttyAMA0,115200n8 rw root=/dev/vda rootwait - - - - - - - - cortex-a53 - - - destroy - restart - restart - - /usr/bin/qemu-system-aarch64 - - - - - - - - - - - - - - - - /dev/random - - - diff --git a/tests/qemuxml2argvdata/qemuxml2argv-aarch64-virtio-pci-default.args b/tests/qemuxml2argvdata/qemuxml2argv-aarch64-virtio-pci-default.args new file mode 100644 index 0000000000..a49bc82b0f --- /dev/null +++ b/tests/qemuxml2argvdata/qemuxml2argv-aarch64-virtio-pci-default.args @@ -0,0 +1,37 @@ +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 \ +-cpu cortex-a53 \ +-m 1024 \ +-smp 1 \ +-uuid 496d7ea8-9739-544b-4ebd-ef08be936e8b \ +-nographic \ +-nodefconfig \ +-nodefaults \ +-monitor unix:/tmp/test-monitor,server,nowait \ +-boot c \ +-kernel /aarch64.kernel \ +-initrd /aarch64.initrd \ +-append 'earlyprintk console=ttyAMA0,115200n8 rw root=/dev/vda rootwait' \ +-dtb /aarch64.dtb \ +-device i82801b11-bridge,id=pci.1,bus=pcie.0,addr=0x1 \ +-device pci-bridge,chassis_nr=2,id=pci.2,bus=pci.1,addr=0x1 \ +-device virtio-serial-device,id=virtio-serial0 \ +-usb \ +-drive file=/aarch64.raw,format=raw,if=none,id=drive-virtio-disk0 \ +-device virtio-blk-device,drive=drive-virtio-disk0,id=virtio-disk0 \ +-device virtio-net-device,vlan=0,id=net0,mac=52:54:00:09:a4:37 \ +-net user,vlan=0,name=hostnet0 \ +-serial pty \ +-chardev pty,id=charconsole1 \ +-device virtconsole,chardev=charconsole1,id=console1 \ +-device virtio-balloon-device,id=balloon0 \ +-object rng-random,id=objrng0,filename=/dev/random \ +-device virtio-rng-device,rng=objrng0,id=rng0 diff --git a/tests/qemuxml2argvdata/qemuxml2argv-aarch64-virtio-pci-default.xml b/tests/qemuxml2argvdata/qemuxml2argv-aarch64-virtio-pci-default.xml new file mode 100644 index 0000000000..ad34615128 --- /dev/null +++ b/tests/qemuxml2argvdata/qemuxml2argv-aarch64-virtio-pci-default.xml @@ -0,0 +1,48 @@ + + aarch64test + 496d7ea8-9739-544b-4ebd-ef08be936e8b + 1048576 + 1048576 + 1 + + hvm + /aarch64.kernel + /aarch64.initrd + /aarch64.dtb + earlyprintk console=ttyAMA0,115200n8 rw root=/dev/vda rootwait + + + + + + + + cortex-a53 + + + destroy + restart + restart + + /usr/bin/qemu-system-aarch64 + + + + + + + + + + + + + + + + /dev/random + + + diff --git a/tests/qemuxml2argvdata/qemuxml2argv-aarch64-virtio-pci-manual-addresses.args b/tests/qemuxml2argvdata/qemuxml2argv-aarch64-virtio-pci-manual-addresses.args new file mode 100644 index 0000000000..142fd5b8e4 --- /dev/null +++ b/tests/qemuxml2argvdata/qemuxml2argv-aarch64-virtio-pci-manual-addresses.args @@ -0,0 +1,32 @@ +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 \ +-cpu cortex-a53 \ +-m 1024 \ +-smp 1 \ +-uuid 496d7ea8-9739-544b-4ebd-ef08be936e8b \ +-nographic \ +-nodefconfig \ +-nodefaults \ +-monitor unix:/tmp/test-monitor,server,nowait \ +-boot c \ +-kernel /aarch64.kernel \ +-initrd /aarch64.initrd \ +-append 'earlyprintk console=ttyAMA0,115200n8 rw root=/dev/vda rootwait' \ +-dtb /aarch64.dtb \ +-device i82801b11-bridge,id=pci.1,bus=pcie.0,addr=0x1 \ +-device pci-bridge,chassis_nr=2,id=pci.2,bus=pci.1,addr=0x1 \ +-device virtio-scsi-pci,id=scsi0,bus=pcie.0,addr=0x3 \ +-usb \ +-drive file=/aarch64.raw,format=raw,if=none,id=drive-scsi0-0-0-0 \ +-device scsi-disk,bus=scsi0.0,channel=0,scsi-id=0,lun=0,drive=drive-scsi0-0-0-0,\ +id=scsi0-0-0-0 \ +-device virtio-net-pci,vlan=0,id=net0,mac=52:54:00:09:a4:37,bus=pcie.0,addr=0x2 \ +-net user,vlan=0,name=hostnet0 diff --git a/tests/qemuxml2argvdata/qemuxml2argv-aarch64-virtio-pci-manual-addresses.xml b/tests/qemuxml2argvdata/qemuxml2argv-aarch64-virtio-pci-manual-addresses.xml new file mode 100644 index 0000000000..6a44f19efe --- /dev/null +++ b/tests/qemuxml2argvdata/qemuxml2argv-aarch64-virtio-pci-manual-addresses.xml @@ -0,0 +1,43 @@ + + aarch64test + 496d7ea8-9739-544b-4ebd-ef08be936e8b + 1048576 + 1048576 + 1 + + hvm + /aarch64.kernel + /aarch64.initrd + earlyprintk console=ttyAMA0,115200n8 rw root=/dev/vda rootwait + /aarch64.dtb + + + + + + + + + cortex-a53 + + + destroy + restart + restart + + /usr/bin/qemu-system-aarch64 + + + +
+ + +
+ + + + +
+ + + diff --git a/tests/qemuxml2argvdata/qemuxml2argv-aarch64-virtio-pci.args b/tests/qemuxml2argvdata/qemuxml2argv-aarch64-virtio-pci.args deleted file mode 100644 index 142fd5b8e4..0000000000 --- a/tests/qemuxml2argvdata/qemuxml2argv-aarch64-virtio-pci.args +++ /dev/null @@ -1,32 +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 \ --cpu cortex-a53 \ --m 1024 \ --smp 1 \ --uuid 496d7ea8-9739-544b-4ebd-ef08be936e8b \ --nographic \ --nodefconfig \ --nodefaults \ --monitor unix:/tmp/test-monitor,server,nowait \ --boot c \ --kernel /aarch64.kernel \ --initrd /aarch64.initrd \ --append 'earlyprintk console=ttyAMA0,115200n8 rw root=/dev/vda rootwait' \ --dtb /aarch64.dtb \ --device i82801b11-bridge,id=pci.1,bus=pcie.0,addr=0x1 \ --device pci-bridge,chassis_nr=2,id=pci.2,bus=pci.1,addr=0x1 \ --device virtio-scsi-pci,id=scsi0,bus=pcie.0,addr=0x3 \ --usb \ --drive file=/aarch64.raw,format=raw,if=none,id=drive-scsi0-0-0-0 \ --device scsi-disk,bus=scsi0.0,channel=0,scsi-id=0,lun=0,drive=drive-scsi0-0-0-0,\ -id=scsi0-0-0-0 \ --device virtio-net-pci,vlan=0,id=net0,mac=52:54:00:09:a4:37,bus=pcie.0,addr=0x2 \ --net user,vlan=0,name=hostnet0 diff --git a/tests/qemuxml2argvdata/qemuxml2argv-aarch64-virtio-pci.xml b/tests/qemuxml2argvdata/qemuxml2argv-aarch64-virtio-pci.xml deleted file mode 100644 index 6a44f19efe..0000000000 --- a/tests/qemuxml2argvdata/qemuxml2argv-aarch64-virtio-pci.xml +++ /dev/null @@ -1,43 +0,0 @@ - - aarch64test - 496d7ea8-9739-544b-4ebd-ef08be936e8b - 1048576 - 1048576 - 1 - - hvm - /aarch64.kernel - /aarch64.initrd - earlyprintk console=ttyAMA0,115200n8 rw root=/dev/vda rootwait - /aarch64.dtb - - - - - - - - - cortex-a53 - - - destroy - restart - restart - - /usr/bin/qemu-system-aarch64 - - - -
- - -
- - - - -
- - - diff --git a/tests/qemuxml2argvtest.c b/tests/qemuxml2argvtest.c index 92043d2dc7..3c7693bf25 100644 --- a/tests/qemuxml2argvtest.c +++ b/tests/qemuxml2argvtest.c @@ -1650,13 +1650,20 @@ mymain(void) QEMU_CAPS_NODEFCONFIG, QEMU_CAPS_DTB, QEMU_CAPS_DEVICE_VIRTIO_MMIO, QEMU_CAPS_DEVICE_VIRTIO_RNG, QEMU_CAPS_OBJECT_RNG_RANDOM); - DO_TEST("aarch64-mmio-default-pci", + + /* Demonstrates the virtio-pci default... namely that there isn't any! + q35 style PCI controllers will be added if the binary supports it, + but virtio-mmio is always used unless PCI addresses are manually + specified. */ + DO_TEST("aarch64-virtio-pci-default", QEMU_CAPS_NODEFCONFIG, QEMU_CAPS_DTB, QEMU_CAPS_DEVICE_VIRTIO_MMIO, 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); - DO_TEST("aarch64-virtio-pci", + /* Example of using virtio-pci with no explicit PCI controller + but with manual PCI addresses */ + DO_TEST("aarch64-virtio-pci-manual-addresses", QEMU_CAPS_NODEFCONFIG, QEMU_CAPS_DTB, QEMU_CAPS_DEVICE_VIRTIO_MMIO, QEMU_CAPS_DEVICE_VIRTIO_RNG, QEMU_CAPS_OBJECT_RNG_RANDOM, diff --git a/tests/qemuxml2xmloutdata/qemuxml2xmlout-aarch64-aavmf-virtio-mmio.xml b/tests/qemuxml2xmloutdata/qemuxml2xmlout-aarch64-aavmf-virtio-mmio.xml index 4a31c8b1cc..f79c6e72a1 100644 --- a/tests/qemuxml2xmloutdata/qemuxml2xmlout-aarch64-aavmf-virtio-mmio.xml +++ b/tests/qemuxml2xmloutdata/qemuxml2xmlout-aarch64-aavmf-virtio-mmio.xml @@ -31,10 +31,13 @@
- + +
+ +
@@ -44,6 +47,7 @@ /dev/random +
diff --git a/tests/qemuxml2xmloutdata/qemuxml2xmlout-aarch64-virtio-pci-default.xml b/tests/qemuxml2xmloutdata/qemuxml2xmlout-aarch64-virtio-pci-default.xml new file mode 100644 index 0000000000..6f1c53b26d --- /dev/null +++ b/tests/qemuxml2xmloutdata/qemuxml2xmlout-aarch64-virtio-pci-default.xml @@ -0,0 +1,69 @@ + + aarch64test + 496d7ea8-9739-544b-4ebd-ef08be936e8b + 1048576 + 1048576 + 1 + + hvm + /aarch64.kernel + /aarch64.initrd + earlyprintk console=ttyAMA0,115200n8 rw root=/dev/vda rootwait + /aarch64.dtb + + + + + + + + + cortex-a53 + + + destroy + restart + restart + + /usr/bin/qemu-system-aarch64 + + + +
+ + + + +
+ + + + +
+ + +
+ + + + +
+ + + + + + + + + + + +
+ + + /dev/random +
+ + + diff --git a/tests/qemuxml2xmloutdata/qemuxml2xmlout-aarch64-virtio-pci-manual-addresses.xml b/tests/qemuxml2xmloutdata/qemuxml2xmlout-aarch64-virtio-pci-manual-addresses.xml new file mode 100644 index 0000000000..4add271a83 --- /dev/null +++ b/tests/qemuxml2xmloutdata/qemuxml2xmlout-aarch64-virtio-pci-manual-addresses.xml @@ -0,0 +1,53 @@ + + aarch64test + 496d7ea8-9739-544b-4ebd-ef08be936e8b + 1048576 + 1048576 + 1 + + hvm + /aarch64.kernel + /aarch64.initrd + earlyprintk console=ttyAMA0,115200n8 rw root=/dev/vda rootwait + /aarch64.dtb + + + + + + + + + cortex-a53 + + + destroy + restart + restart + + /usr/bin/qemu-system-aarch64 + + + +
+ + +
+ + + + +
+ + + + +
+ + + + +
+ + + diff --git a/tests/qemuxml2xmltest.c b/tests/qemuxml2xmltest.c index 4429b6bbab..d9550ccee8 100644 --- a/tests/qemuxml2xmltest.c +++ b/tests/qemuxml2xmltest.c @@ -720,8 +720,23 @@ mymain(void) DO_TEST("shmem"); DO_TEST("smbios"); DO_TEST("smbios-multiple-type2"); - DO_TEST("aarch64-aavmf-virtio-mmio"); + DO_TEST_FULL("aarch64-aavmf-virtio-mmio", WHEN_ACTIVE, + QEMU_CAPS_NODEFCONFIG, QEMU_CAPS_DTB, + QEMU_CAPS_DEVICE_VIRTIO_MMIO, + QEMU_CAPS_DEVICE_VIRTIO_RNG, QEMU_CAPS_OBJECT_RNG_RANDOM); + DO_TEST_FULL("aarch64-virtio-pci-default", WHEN_ACTIVE, + QEMU_CAPS_NODEFCONFIG, QEMU_CAPS_DTB, + QEMU_CAPS_DEVICE_VIRTIO_MMIO, + 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_FULL("aarch64-virtio-pci-manual-addresses", WHEN_ACTIVE, + QEMU_CAPS_NODEFCONFIG, QEMU_CAPS_DTB, + QEMU_CAPS_DEVICE_VIRTIO_MMIO, + 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");