From: Peter Krempa Date: Fri, 14 Nov 2025 15:13:55 +0000 (+0100) Subject: qemuxmlconftest: Improve coverage of 'disk-detect-zeroes' test case X-Git-Tag: v11.10.0-rc1~88 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=312be5eb9acfc3bbf164583ed7ed1d3b89698c5a;p=thirdparty%2Flibvirt.git qemuxmlconftest: Improve coverage of 'disk-detect-zeroes' test case Add test cases for all three options 'off'/'on'/'unmap' as well as add backing store for each image to show how the configuration behaves. Signed-off-by: Peter Krempa Reviewed-by: Ján Tomko Reviewed-by: Andrea Bolognani --- diff --git a/tests/qemuxmlconfdata/disk-detect-zeroes.x86_64-latest.args b/tests/qemuxmlconfdata/disk-detect-zeroes.x86_64-latest.args index 07acc46113..d959d4a717 100644 --- a/tests/qemuxmlconfdata/disk-detect-zeroes.x86_64-latest.args +++ b/tests/qemuxmlconfdata/disk-detect-zeroes.x86_64-latest.args @@ -27,10 +27,22 @@ XDG_CONFIG_HOME=/var/lib/libvirt/qemu/domain--1-test/.config \ -no-shutdown \ -boot menu=on,strict=on \ -device '{"driver":"piix3-usb-uhci","id":"usb","bus":"pci.0","addr":"0x1.0x2"}' \ --blockdev '{"driver":"file","filename":"/var/lib/libvirt/images/f14.img","node-name":"libvirt-2-storage","auto-read-only":true,"discard":"unmap"}' \ --blockdev '{"node-name":"libvirt-2-format","read-only":false,"discard":"unmap","detect-zeroes":"unmap","driver":"qcow2","file":"libvirt-2-storage"}' \ --device '{"driver":"virtio-blk-pci","bus":"pci.0","addr":"0x4","drive":"libvirt-2-format","id":"virtio-disk0","bootindex":2}' \ --blockdev '{"driver":"file","filename":"/var/lib/libvirt/Fedora-14-x86_64-Live-KDE.iso","node-name":"libvirt-1-storage","read-only":true,"discard":"ignore","detect-zeroes":"on"}' \ +-blockdev '{"driver":"file","filename":"/var/lib/libvirt/images/detect-zeroes-unmap-back.img","node-name":"libvirt-7-storage","auto-read-only":true,"discard":"unmap"}' \ +-blockdev '{"node-name":"libvirt-7-format","read-only":true,"discard":"unmap","driver":"qcow2","file":"libvirt-7-storage","backing":null}' \ +-blockdev '{"driver":"file","filename":"/var/lib/libvirt/images/detect-zeroes-unmap.img","node-name":"libvirt-6-storage","auto-read-only":true,"discard":"unmap"}' \ +-blockdev '{"node-name":"libvirt-6-format","read-only":false,"discard":"unmap","detect-zeroes":"unmap","driver":"qcow2","file":"libvirt-6-storage","backing":"libvirt-7-format"}' \ +-device '{"driver":"virtio-blk-pci","bus":"pci.0","addr":"0x4","drive":"libvirt-6-format","id":"virtio-disk0","bootindex":2}' \ +-blockdev '{"driver":"file","filename":"/var/lib/libvirt/images/detect-zeroes-on-back.img","node-name":"libvirt-5-storage","auto-read-only":true,"discard":"unmap"}' \ +-blockdev '{"node-name":"libvirt-5-format","read-only":true,"discard":"unmap","driver":"qcow2","file":"libvirt-5-storage","backing":null}' \ +-blockdev '{"driver":"file","filename":"/var/lib/libvirt/images/detect-zeroes-on.img","node-name":"libvirt-4-storage","auto-read-only":true,"discard":"unmap"}' \ +-blockdev '{"node-name":"libvirt-4-format","read-only":false,"discard":"unmap","detect-zeroes":"on","driver":"qcow2","file":"libvirt-4-storage","backing":"libvirt-5-format"}' \ +-device '{"driver":"virtio-blk-pci","bus":"pci.0","addr":"0x5","drive":"libvirt-4-format","id":"virtio-disk1"}' \ +-blockdev '{"driver":"file","filename":"/var/lib/libvirt/images/detect-zeroes-off-back.img","node-name":"libvirt-3-storage","auto-read-only":true,"discard":"unmap"}' \ +-blockdev '{"node-name":"libvirt-3-format","read-only":true,"discard":"unmap","driver":"qcow2","file":"libvirt-3-storage","backing":null}' \ +-blockdev '{"driver":"file","filename":"/var/lib/libvirt/images/detect-zeroes-off.img","node-name":"libvirt-2-storage","auto-read-only":true,"discard":"unmap"}' \ +-blockdev '{"node-name":"libvirt-2-format","read-only":false,"discard":"unmap","detect-zeroes":"off","driver":"qcow2","file":"libvirt-2-storage","backing":"libvirt-3-format"}' \ +-device '{"driver":"virtio-blk-pci","bus":"pci.0","addr":"0x6","drive":"libvirt-2-format","id":"virtio-disk2"}' \ +-blockdev '{"driver":"file","filename":"/var/lib/libvirt/detect-zeroes-cdrom.iso","node-name":"libvirt-1-storage","read-only":true,"discard":"ignore","detect-zeroes":"on"}' \ -device '{"driver":"ide-cd","bus":"ide.1","unit":0,"drive":"libvirt-1-storage","id":"ide0-1-0","bootindex":1}' \ -audiodev '{"id":"audio1","driver":"none"}' \ -device '{"driver":"virtio-balloon-pci","id":"balloon0","bus":"pci.0","addr":"0x3"}' \ diff --git a/tests/qemuxmlconfdata/disk-detect-zeroes.xml b/tests/qemuxmlconfdata/disk-detect-zeroes.xml index ca3732c391..3ea15c3a46 100644 --- a/tests/qemuxmlconfdata/disk-detect-zeroes.xml +++ b/tests/qemuxmlconfdata/disk-detect-zeroes.xml @@ -21,13 +21,40 @@ /usr/bin/qemu-system-x86_64 - + + + + + +
+ + + + + + + + + +
+ + + + + + + + + + +
+ - +