From 0770587d28f7b7495172b41da6a6476467cf374e Mon Sep 17 00:00:00 2001 From: Andrea Bolognani Date: Thu, 30 Aug 2018 18:03:58 +0200 Subject: [PATCH] tests: Fix use of virtio-serial for aarch64/virt MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit virtio-serial is an alias for virtio-serial-pci, which should not have been used for a PCIe-less aarch64/virt guest but it ended up being used anyway because the virtio-mmio capability was missing and the algorithm is buggy. Fix the test case so that we can fix the algorithm next. Signed-off-by: Andrea Bolognani Reviewed-by: Ján Tomko --- tests/qemuxml2argvdata/mach-virt-console-virtio.args | 2 +- tests/qemuxml2argvtest.c | 3 ++- tests/qemuxml2xmloutdata/mach-virt-console-virtio.xml | 4 +++- tests/qemuxml2xmltest.c | 6 ++++-- 4 files changed, 10 insertions(+), 5 deletions(-) diff --git a/tests/qemuxml2argvdata/mach-virt-console-virtio.args b/tests/qemuxml2argvdata/mach-virt-console-virtio.args index d76c5892aa..f4a43ff7c6 100644 --- a/tests/qemuxml2argvdata/mach-virt-console-virtio.args +++ b/tests/qemuxml2argvdata/mach-virt-console-virtio.args @@ -20,6 +20,6 @@ server,nowait \ -rtc base=utc \ -no-shutdown \ -no-acpi \ --device virtio-serial,id=virtio-serial0 \ +-device virtio-serial-device,id=virtio-serial0 \ -chardev pty,id=charconsole0 \ -device virtconsole,chardev=charconsole0,id=console0 diff --git a/tests/qemuxml2argvtest.c b/tests/qemuxml2argvtest.c index 9bfe864597..144e595310 100644 --- a/tests/qemuxml2argvtest.c +++ b/tests/qemuxml2argvtest.c @@ -1976,7 +1976,8 @@ mymain(void) QEMU_CAPS_DEVICE_USB_SERIAL); DO_TEST("mach-virt-console-native", QEMU_CAPS_DEVICE_PL011); - DO_TEST("mach-virt-console-virtio", NONE); + DO_TEST("mach-virt-console-virtio", + QEMU_CAPS_DEVICE_VIRTIO_MMIO); DO_TEST_PARSE_ERROR("mach-virt-serial-invalid-machine", NONE); DO_TEST("disk-ide-split", diff --git a/tests/qemuxml2xmloutdata/mach-virt-console-virtio.xml b/tests/qemuxml2xmloutdata/mach-virt-console-virtio.xml index 3e46cd2012..84e5c37ad9 100644 --- a/tests/qemuxml2xmloutdata/mach-virt-console-virtio.xml +++ b/tests/qemuxml2xmloutdata/mach-virt-console-virtio.xml @@ -18,7 +18,9 @@ /usr/bin/qemu-system-aarch64 - + +
+ diff --git a/tests/qemuxml2xmltest.c b/tests/qemuxml2xmltest.c index 43fd4e5f0f..47da7a7201 100644 --- a/tests/qemuxml2xmltest.c +++ b/tests/qemuxml2xmltest.c @@ -644,8 +644,10 @@ mymain(void) QEMU_CAPS_DEVICE_PCIE_ROOT_PORT, QEMU_CAPS_DEVICE_QEMU_XHCI, QEMU_CAPS_DEVICE_USB_SERIAL); - DO_TEST("mach-virt-console-native", NONE); - DO_TEST("mach-virt-console-virtio", NONE); + DO_TEST("mach-virt-console-native", + QEMU_CAPS_DEVICE_PL011); + DO_TEST("mach-virt-console-virtio", + QEMU_CAPS_DEVICE_VIRTIO_MMIO); DO_TEST("balloon-device-auto", NONE); DO_TEST("balloon-device-period", NONE);