From 27e502c108e01538227601b20a1d3d22a2b54708 Mon Sep 17 00:00:00 2001 Message-Id: <27e502c108e01538227601b20a1d3d22a2b54708@dist-git> From: Cole Robinson Date: Tue, 11 Jul 2017 10:57:40 +0200 Subject: [PATCH] tests: qemuxml2argv: Add an aarch64 pci-serial test This demonstrates that the previous qemu caps changes will use -chardev for pci-serial on aarch64 machvirt Reviewed-by: Andrea Bolognani Signed-off-by: Cole Robinson (cherry picked from commit 5afe52a871825ca173a4a4a70861b56b5b00b5ad) Bug: https://bugzilla.redhat.com/show_bug.cgi?id=1435681 Signed-off-by: Andrea Bolognani Signed-off-by: Jiri Denemark --- .../qemuxml2argv-aarch64-pci-serial.args | 26 ++++++++++++++ .../qemuxml2argv-aarch64-pci-serial.xml | 16 +++++++++ tests/qemuxml2argvtest.c | 9 +++++ .../qemuxml2xmlout-aarch64-pci-serial.xml | 41 ++++++++++++++++++++++ tests/qemuxml2xmltest.c | 9 +++++ 5 files changed, 101 insertions(+) create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-aarch64-pci-serial.args create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-aarch64-pci-serial.xml create mode 100644 tests/qemuxml2xmloutdata/qemuxml2xmlout-aarch64-pci-serial.xml diff --git a/tests/qemuxml2argvdata/qemuxml2argv-aarch64-pci-serial.args b/tests/qemuxml2argvdata/qemuxml2argv-aarch64-pci-serial.args new file mode 100644 index 0000000000..6cab29fec3 --- /dev/null +++ b/tests/qemuxml2argvdata/qemuxml2argv-aarch64-pci-serial.args @@ -0,0 +1,26 @@ +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 \ +-m 1024 \ +-smp 1,sockets=1,cores=1,threads=1 \ +-uuid 496d7ea8-9739-544b-4ebd-ef08be936e8b \ +-nographic \ +-nodefconfig \ +-nodefaults \ +-chardev socket,id=charmonitor,\ +path=/tmp/lib/domain--1-aarch64test/monitor.sock,server,nowait \ +-mon chardev=charmonitor,id=monitor,mode=readline \ +-no-acpi \ +-boot c \ +-device i82801b11-bridge,id=pci.1,bus=pcie.0,addr=0x1 \ +-device pci-bridge,chassis_nr=2,id=pci.2,bus=pci.1,addr=0x0 \ +-device pcie-root-port,port=0x10,chassis=3,id=pci.3,bus=pcie.0,addr=0x2 \ +-chardev pty,id=charserial0,logfile=/tmp/log,logappend=on \ +-device pci-serial,chardev=charserial0,id=serial0,bus=pci.2,addr=0x1 diff --git a/tests/qemuxml2argvdata/qemuxml2argv-aarch64-pci-serial.xml b/tests/qemuxml2argvdata/qemuxml2argv-aarch64-pci-serial.xml new file mode 100644 index 0000000000..0df12102c9 --- /dev/null +++ b/tests/qemuxml2argvdata/qemuxml2argv-aarch64-pci-serial.xml @@ -0,0 +1,16 @@ + + aarch64test + 496d7ea8-9739-544b-4ebd-ef08be936e8b + 1048576 + 1 + + hvm + + + /usr/bin/qemu-system-aarch64 + + + + + + diff --git a/tests/qemuxml2argvtest.c b/tests/qemuxml2argvtest.c index 6ac24c9bb0..f47d282e31 100644 --- a/tests/qemuxml2argvtest.c +++ b/tests/qemuxml2argvtest.c @@ -2347,6 +2347,15 @@ mymain(void) DO_TEST_FAILURE("aarch64-kvm-32-on-64", QEMU_CAPS_NODEFCONFIG, QEMU_CAPS_DEVICE_VIRTIO_MMIO, QEMU_CAPS_KVM); + DO_TEST("aarch64-pci-serial", + QEMU_CAPS_NODEFCONFIG, + QEMU_CAPS_CHARDEV, + QEMU_CAPS_DEVICE_PCI_SERIAL, + QEMU_CAPS_CHARDEV_LOGFILE, + QEMU_CAPS_OBJECT_GPEX, + QEMU_CAPS_DEVICE_PCI_BRIDGE, + QEMU_CAPS_DEVICE_DMI_TO_PCI_BRIDGE, + QEMU_CAPS_DEVICE_PCIE_ROOT_PORT); /* Make sure all combinations of ACPI and UEFI behave as expected */ DO_TEST("aarch64-acpi-uefi", NONE); diff --git a/tests/qemuxml2xmloutdata/qemuxml2xmlout-aarch64-pci-serial.xml b/tests/qemuxml2xmloutdata/qemuxml2xmlout-aarch64-pci-serial.xml new file mode 100644 index 0000000000..fddab31f07 --- /dev/null +++ b/tests/qemuxml2xmloutdata/qemuxml2xmlout-aarch64-pci-serial.xml @@ -0,0 +1,41 @@ + + aarch64test + 496d7ea8-9739-544b-4ebd-ef08be936e8b + 1048576 + 1048576 + 1 + + hvm + + + + + + + destroy + restart + destroy + + /usr/bin/qemu-system-aarch64 + + + +
+ + + + +
+ + + + +
+ + + + +
+ + + diff --git a/tests/qemuxml2xmltest.c b/tests/qemuxml2xmltest.c index f2abad00cf..95bb154400 100644 --- a/tests/qemuxml2xmltest.c +++ b/tests/qemuxml2xmltest.c @@ -1073,6 +1073,15 @@ mymain(void) QEMU_CAPS_DEVICE_PCI_BRIDGE, QEMU_CAPS_DEVICE_IOH3420, QEMU_CAPS_PCI_MULTIFUNCTION, QEMU_CAPS_DEVICE_VIDEO_PRIMARY, QEMU_CAPS_DEVICE_VIRTIO_GPU, QEMU_CAPS_BOOTINDEX); + DO_TEST("aarch64-pci-serial", + QEMU_CAPS_NODEFCONFIG, + QEMU_CAPS_CHARDEV, + QEMU_CAPS_DEVICE_PCI_SERIAL, + QEMU_CAPS_CHARDEV_LOGFILE, + QEMU_CAPS_OBJECT_GPEX, + QEMU_CAPS_DEVICE_PCI_BRIDGE, + QEMU_CAPS_DEVICE_DMI_TO_PCI_BRIDGE, + QEMU_CAPS_DEVICE_PCIE_ROOT_PORT); DO_TEST_FULL("aarch64-gic-none", WHEN_BOTH, GIC_NONE, NONE); DO_TEST_FULL("aarch64-gic-none-v2", WHEN_BOTH, GIC_V2, NONE); -- 2.13.3