]> git.ipfire.org Git - thirdparty/libvirt.git/commit
tests: qemublock: Test handling of 'unmap' and 'detect-zeroes' options
authorPeter Krempa <pkrempa@redhat.com>
Fri, 6 Apr 2018 12:07:44 +0000 (14:07 +0200)
committerPeter Krempa <pkrempa@redhat.com>
Mon, 7 May 2018 14:05:31 +0000 (16:05 +0200)
commit24db3d9993e0a05af2f2e20d03e28ceb766ff018
tree6ca1b2d47f02c05c9eee84670ff0319df16f582d
parent18458e8fd151dae14923b9b22c5ac4dd2ac8bd24
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>
tests/qemublocktest.c
tests/qemublocktestdata/xml2json/file-backing_basic-detect.json [new file with mode: 0644]
tests/qemublocktestdata/xml2json/file-backing_basic-detect.xml [new file with mode: 0644]
tests/qemublocktestdata/xml2json/file-backing_basic-unmap-detect.json [new file with mode: 0644]
tests/qemublocktestdata/xml2json/file-backing_basic-unmap-detect.xml [new file with mode: 0644]
tests/qemublocktestdata/xml2json/file-backing_basic-unmap-ignore.json [new file with mode: 0644]
tests/qemublocktestdata/xml2json/file-backing_basic-unmap-ignore.xml [new file with mode: 0644]
tests/qemublocktestdata/xml2json/file-backing_basic-unmap.json [new file with mode: 0644]
tests/qemublocktestdata/xml2json/file-backing_basic-unmap.xml [new file with mode: 0644]