]> xenbits.xensource.com Git - libvirt.git/commitdiff
tests: Fix use of virtio-serial for aarch64/virt
authorAndrea Bolognani <abologna@redhat.com>
Thu, 30 Aug 2018 16:03:58 +0000 (18:03 +0200)
committerAndrea Bolognani <abologna@redhat.com>
Wed, 5 Sep 2018 13:54:41 +0000 (15:54 +0200)
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>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
tests/qemuxml2argvdata/mach-virt-console-virtio.args
tests/qemuxml2argvtest.c
tests/qemuxml2xmloutdata/mach-virt-console-virtio.xml
tests/qemuxml2xmltest.c

index d76c5892aa343a91a4f54f4b66bcb55202b859a2..f4a43ff7c6373f1a46eae91fdc76c53c97430363 100644 (file)
@@ -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
index 9bfe864597fcebe1129d7f338c41eca348849064..144e595310e8d67d23c2d98b2a3f01b2d5201c4d 100644 (file)
@@ -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",
index 3e46cd201260188c5a15f377cba2627716d7197b..84e5c37ad9b7de46a8d5561423c9fad5979ff489 100644 (file)
@@ -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>
index 43fd4e5f0f0e5be44f9b2a9730676cb449978300..47da7a72012710f09bf630e4883bcd0d38da914c 100644 (file)
@@ -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);