]> git.ipfire.org Git - thirdparty/qemu.git/commit
iotests: Filter out ZFS in several tests
authorEric Blake <eblake@redhat.com>
Fri, 23 May 2025 16:27:23 +0000 (11:27 -0500)
committerEric Blake <eblake@redhat.com>
Thu, 29 May 2025 21:40:00 +0000 (16:40 -0500)
commitc49dda7254d43d9e1d4da59c55f02055ba7c4c1b
tree5be8313900f367b2b9c418c6dc02ab541d700310
parented1c336119c084159575ae9d4fd9171bd500f7e4
iotests: Filter out ZFS in several tests

Fiona reported that ZFS makes sparse file testing awkward, since:
- it has asynchronous allocation (not even 'fsync $file' makes du see
  the desired size; it takes the slower 'fsync -f $file' which is not
  appropriate for the tests)
- for tests of fully allocated files, ZFS with compression enabled
  still reports smaller disk usage

Add a new _require_disk_usage that quickly probes whether an attempt
to create a sparse 5M file shows as less than 1M usage, while the same
file with -o preallocation=full shows as more than 4M usage without
sync, which should filter out ZFS behavior.  Then use it in various
affected tests.

This does not add the new filter on all tests that Fiona is seeing ZFS
failures on, but only those where I could quickly spot that there is
at least one place where the test depends on the output of 'du -b' or
'stat -c %b'.

Reported-by: Fiona Ebner <f.ebner@proxmox.com>
Signed-off-by: Eric Blake <eblake@redhat.com>
Message-ID: <20250523163041.2548675-8-eblake@redhat.com>
Reviewed-by: Fiona Ebner <f.ebner@proxmox.com>
Tested-by: Fiona Ebner <f.ebner@proxmox.com>
tests/qemu-iotests/106
tests/qemu-iotests/175
tests/qemu-iotests/221
tests/qemu-iotests/253
tests/qemu-iotests/308
tests/qemu-iotests/common.rc
tests/qemu-iotests/tests/mirror-sparse
tests/qemu-iotests/tests/write-zeroes-unmap