[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

[libvirt] [PATCH 1/2] tests: Fix use of virtio-serial for aarch64/virt



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 <abologna redhat com>
---
 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 @@
   <devices>
     <emulator>/usr/bin/qemu-system-aarch64</emulator>
     <controller type='usb' index='0' model='none'/>
-    <controller type='virtio-serial' index='0'/>
+    <controller type='virtio-serial' index='0'>
+      <address type='virtio-mmio'/>
+    </controller>
     <console type='pty'>
       <target type='virtio' port='0'/>
     </console>
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);
-- 
2.17.1


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]