tests: qemublock: Test handling of 'unmap' and 'detect-zeroes' options
The test cases would correspond to the following -drive command lines:
file-backing_basic-detect.xml:
-drive file=/var/lib/libvirt/images/a,format=qcow,if=none,id=drive-dummy,detect-zeroes=on
-device virtio-blk-pci,scsi=off,drive=drive-dummy,id=dummy
file-backing_basic-unmap-detect.xml:
-drive file=/var/lib/libvirt/images/a,format=qcow,if=none,id=drive-dummy,discard=unmap,detect-zeroes=unmap
-device virtio-blk-pci,scsi=off,drive=drive-dummy,id=dummy
file-backing_basic-unmap-ignore.xml:
-drive file=/var/lib/libvirt/images/a,format=qcow,if=none,id=drive-dummy,discard=ignore,detect-zeroes=on
-device virtio-blk-pci,scsi=off,drive=drive-dummy,id=dummy
file-backing_basic-unmap.xml:
-drive file=/var/lib/libvirt/images/a,format=qcow,if=none,id=drive-dummy,discard=unmap
-device virtio-blk-pci,scsi=off,drive=drive-dummy,id=dummy
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: John Ferlan <jferlan@redhat.com>
2018-04-06 14:07:44 +02:00
<disk type= 'file' device= 'disk' >
<driver name= 'qemu' type= 'qcow' detect_zeroes= 'unmap' />
<source file= '/var/lib/libvirt/images/a' >
<privateData >
<nodenames >
<nodename type= 'storage' name= 'node-a-s' />
<nodename type= 'format' name= 'node-a-f' />
</nodenames>
</privateData>
</source>
<backingStore type= 'file' index= '1' >
<format type= 'qed' />
<source file= '/var/lib/libvirt/images/b' >
<privateData >
<nodenames >
<nodename type= 'storage' name= 'node-b-s' />
<nodename type= 'format' name= 'node-b-f' />
</nodenames>
</privateData>
</source>
<backingStore type= 'network' index= '2' >
<format type= 'vmdk' />
2024-10-10 17:21:40 +02:00
<source protocol= 'nbd' name= 'images/c' >
tests: qemublock: Test handling of 'unmap' and 'detect-zeroes' options
The test cases would correspond to the following -drive command lines:
file-backing_basic-detect.xml:
-drive file=/var/lib/libvirt/images/a,format=qcow,if=none,id=drive-dummy,detect-zeroes=on
-device virtio-blk-pci,scsi=off,drive=drive-dummy,id=dummy
file-backing_basic-unmap-detect.xml:
-drive file=/var/lib/libvirt/images/a,format=qcow,if=none,id=drive-dummy,discard=unmap,detect-zeroes=unmap
-device virtio-blk-pci,scsi=off,drive=drive-dummy,id=dummy
file-backing_basic-unmap-ignore.xml:
-drive file=/var/lib/libvirt/images/a,format=qcow,if=none,id=drive-dummy,discard=ignore,detect-zeroes=on
-device virtio-blk-pci,scsi=off,drive=drive-dummy,id=dummy
file-backing_basic-unmap.xml:
-drive file=/var/lib/libvirt/images/a,format=qcow,if=none,id=drive-dummy,discard=unmap
-device virtio-blk-pci,scsi=off,drive=drive-dummy,id=dummy
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: John Ferlan <jferlan@redhat.com>
2018-04-06 14:07:44 +02:00
<host name= 'test.org' />
<privateData >
<nodenames >
<nodename type= 'storage' name= 'node-c-s' />
<nodename type= 'format' name= 'node-c-f' />
</nodenames>
</privateData>
</source>
<backingStore type= 'file' index= '3' >
<format type= 'raw' />
<source file= '/var/lib/libvirt/images/d' >
<privateData >
<nodenames >
<nodename type= 'storage' name= 'node-d-s' />
<nodename type= 'format' name= 'node-d-f' />
</nodenames>
</privateData>
</source>
<backingStore />
</backingStore>
</backingStore>
</backingStore>
<target dev= 'vda' />
</disk>