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@xxxxxxxxxx> --- .../disk-aio-io_uring.x86_64-latest.args | 5 ++++- tests/qemuxml2argvdata/disk-aio-io_uring.xml | 10 ++++++++-- .../disk-aio-io_uring.x86_64-latest.xml | 10 ++++++++-- 3 files changed, 20 insertions(+), 5 deletions(-) diff --git a/tests/qemuxml2argvdata/disk-aio-io_uring.x86_64-latest.args b/tests/qemuxml2argvdata/disk-aio-io_uring.x86_64-latest.args index 5500f70bf9..b771df752e 100644 --- a/tests/qemuxml2argvdata/disk-aio-io_uring.x86_64-latest.args +++ b/tests/qemuxml2argvdata/disk-aio-io_uring.x86_64-latest.args @@ -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 \ diff --git a/tests/qemuxml2argvdata/disk-aio-io_uring.xml b/tests/qemuxml2argvdata/disk-aio-io_uring.xml index 9e6ea6225d..21769c0552 100644 --- a/tests/qemuxml2argvdata/disk-aio-io_uring.xml +++ b/tests/qemuxml2argvdata/disk-aio-io_uring.xml @@ -14,10 +14,16 @@ <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'/> diff --git a/tests/qemuxml2xmloutdata/disk-aio-io_uring.x86_64-latest.xml b/tests/qemuxml2xmloutdata/disk-aio-io_uring.x86_64-latest.xml index 0e0ef77eae..190e827d10 100644 --- a/tests/qemuxml2xmloutdata/disk-aio-io_uring.x86_64-latest.xml +++ b/tests/qemuxml2xmloutdata/disk-aio-io_uring.x86_64-latest.xml @@ -17,10 +17,16 @@ <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'> -- 2.36.1