]> xenbits.xensource.com Git - libvirt.git/commitdiff
qemuxml2*test: Add 'startupPolicy' fields to aio-io_uring case
authorPeter Krempa <pkrempa@redhat.com>
Tue, 14 Jun 2022 14:47:51 +0000 (16:47 +0200)
committerPeter Krempa <pkrempa@redhat.com>
Wed, 13 Jul 2022 07:27:06 +0000 (09:27 +0200)
Extend the test for io_uring to also test startup policy.

Since the actual logic for dropping disks is in the host preparation
phase, thus skipped for tests we can use any file path.

Add a case also for 'file' backing to have all cases covered.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
tests/qemuxml2argvdata/disk-aio-io_uring.x86_64-latest.args
tests/qemuxml2argvdata/disk-aio-io_uring.xml
tests/qemuxml2xmloutdata/disk-aio-io_uring.x86_64-latest.xml

index 5500f70bf93e402d929f809337fe7e29a439dad6..b771df752e91ce1f821a7bb14d786eb025d3264c 100644 (file)
@@ -28,9 +28,12 @@ XDG_CONFIG_HOME=/tmp/lib/domain--1-QEMUGuest1/.config \
 -no-acpi \
 -boot strict=on \
 -device '{"driver":"piix3-usb-uhci","id":"usb","bus":"pci.0","addr":"0x1.0x2"}' \
+-blockdev '{"driver":"file","filename":"/path/to/file.qcow2","aio":"io_uring","node-name":"libvirt-2-storage","auto-read-only":true,"discard":"unmap"}' \
+-blockdev '{"node-name":"libvirt-2-format","read-only":false,"driver":"qcow2","file":"libvirt-2-storage"}' \
+-device '{"driver":"virtio-blk-pci","bus":"pci.0","addr":"0xa","drive":"libvirt-2-format","id":"virtio-disk0","bootindex":1}' \
 -blockdev '{"driver":"host_device","filename":"/dev/HostVG/QEMUGuest1","aio":"io_uring","node-name":"libvirt-1-storage","auto-read-only":true,"discard":"unmap"}' \
 -blockdev '{"node-name":"libvirt-1-format","read-only":false,"driver":"qcow2","file":"libvirt-1-storage"}' \
--device '{"driver":"virtio-blk-pci","bus":"pci.0","addr":"0x9","drive":"libvirt-1-format","id":"virtio-disk0","bootindex":1}' \
+-device '{"driver":"virtio-blk-pci","bus":"pci.0","addr":"0x9","drive":"libvirt-1-format","id":"virtio-disk1"}' \
 -audiodev '{"id":"audio1","driver":"none"}' \
 -device '{"driver":"virtio-balloon-pci","id":"balloon0","bus":"pci.0","addr":"0x2"}' \
 -sandbox on,obsolete=deny,elevateprivileges=deny,spawn=deny,resourcecontrol=deny \
index 9e6ea6225d54d220c0da612b8648631be69d0679..21769c05525ba512b8202c08c9136100676ab9c2 100644 (file)
   <on_crash>destroy</on_crash>
   <devices>
     <emulator>/usr/bin/qemu-system-x86_64</emulator>
-    <disk type='block' device='disk'>
+    <disk type='file' device='disk'>
       <driver name='qemu' type='qcow2' io='io_uring'/>
-      <source dev='/dev/HostVG/QEMUGuest1'/>
+      <source file='/path/to/file.qcow2' startupPolicy='optional'/>
       <target dev='vda' bus='virtio'/>
+      <address type='pci' domain='0x0000' bus='0x00' slot='0x0A' function='0x0'/>
+    </disk>
+    <disk type='block' device='disk'>
+      <driver name='qemu' type='qcow2' io='io_uring'/>
+      <source dev='/dev/HostVG/QEMUGuest1' startupPolicy='optional'/>
+      <target dev='vdb' bus='virtio'/>
       <address type='pci' domain='0x0000' bus='0x00' slot='0x09' function='0x0'/>
     </disk>
     <controller type='usb' index='0'/>
index 0e0ef77eaef1d065a5443038d9bb96beca3f13bf..190e827d10ffb0ba523e25a1cc646090e1f9af17 100644 (file)
   <on_crash>destroy</on_crash>
   <devices>
     <emulator>/usr/bin/qemu-system-x86_64</emulator>
-    <disk type='block' device='disk'>
+    <disk type='file' device='disk'>
       <driver name='qemu' type='qcow2' io='io_uring'/>
-      <source dev='/dev/HostVG/QEMUGuest1'/>
+      <source file='/path/to/file.qcow2' startupPolicy='optional'/>
       <target dev='vda' bus='virtio'/>
+      <address type='pci' domain='0x0000' bus='0x00' slot='0x0a' function='0x0'/>
+    </disk>
+    <disk type='block' device='disk'>
+      <driver name='qemu' type='qcow2' io='io_uring'/>
+      <source dev='/dev/HostVG/QEMUGuest1' startupPolicy='optional'/>
+      <target dev='vdb' bus='virtio'/>
       <address type='pci' domain='0x0000' bus='0x00' slot='0x09' function='0x0'/>
     </disk>
     <controller type='usb' index='0' model='piix3-uhci'>