cloud-hypervisor/block/src
Anatol Belski 4676fdb494 block: Add unit tests for DISCARD zero flag
Add comprehensive tests for DISCARD and WRITE_ZEROES operations:

QCOW2 zero flag test validates the complete workflow: allocate
cluster, DISCARD it, verify reads return zeros, write new data,
verify cluster reallocated.

QcowSync tests verify punch_hole and write_zeroes with Arc<Mutex<>>
sharing, including tests for cache consistency with multiple async
I/O operations.

RawFileSync tests verify punch_hole and write_zeroes using
fallocate.

Signed-off-by: Anatol Belski <anbelski@linux.microsoft.com>
2026-02-13 18:44:30 +00:00
..
qcow block: Add unit tests for DISCARD zero flag 2026-02-13 18:44:30 +00:00
vhdx block: add DiskFile::physical_size() 2025-12-14 17:02:36 +00:00
async_io.rs block: Add supports_zero_flag trait method 2026-02-13 18:44:30 +00:00
fcntl.rs misc: clippy: add needless_pass_by_value (partially) 2025-11-25 16:05:46 +00:00
fixed_vhd.rs block: add DiskFile::physical_size() 2025-12-14 17:02:36 +00:00
fixed_vhd_async.rs block: Add punch_hole and write_zeroes to AsyncIo trait 2026-02-13 18:44:30 +00:00
fixed_vhd_sync.rs block: Add punch_hole and write_zeroes to AsyncIo trait 2026-02-13 18:44:30 +00:00
lib.rs block: Add virtio-blk DISCARD and WRITE_ZEROES support 2026-02-13 18:44:30 +00:00
qcow_sync.rs block: Add unit tests for DISCARD zero flag 2026-02-13 18:44:30 +00:00
raw_async.rs block: raw: Implement punch_hole and write_zeroes 2026-02-13 18:44:30 +00:00
raw_async_aio.rs block: Add sparse operations capability query 2026-02-13 18:44:30 +00:00
raw_sync.rs block: Add unit tests for DISCARD zero flag 2026-02-13 18:44:30 +00:00
vhd.rs tests: streamline module names to unit_tests 2025-11-20 21:15:03 +00:00
vhdx_sync.rs block: Add punch_hole and write_zeroes to AsyncIo trait 2026-02-13 18:44:30 +00:00