mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-09 10:34:58 -06:00
qemu-iotests: add sub-cluster allocating write test for sparse image formats
Image formats that grow the image file on demand and are organized into clusters must handle sub-cluster allocating writes. Such writes touch a portion of a previously unallocated data cluster. After the image file is grown with the written data, reads of that cluster should work as expected: 1. Sectors before the written region are zero. 2. The written region is present and the data is uncorrupted. 3. Sectors after the written region are zero. Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com> Signed-off-by: Christoph Hellwig <hch@lst.de>
This commit is contained in:
parent
2547caa169
commit
89d22bc306
3 changed files with 101 additions and 0 deletions
23
tests/qemu-iotests/027.out
Normal file
23
tests/qemu-iotests/027.out
Normal file
|
@ -0,0 +1,23 @@
|
|||
QA output created by 027
|
||||
Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=134217728
|
||||
|
||||
== writing first cluster to populate metadata ==
|
||||
wrote 65536/65536 bytes at offset 65536
|
||||
64 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
|
||||
|
||||
== writing at sub-cluster granularity ==
|
||||
wrote 2048/2048 bytes at offset 1024
|
||||
2 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
|
||||
|
||||
== verify pattern ==
|
||||
read 2048/2048 bytes at offset 1024
|
||||
2 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
|
||||
|
||||
== verify zeroes before sub-cluster pattern ==
|
||||
read 2048/2048 bytes at offset 0
|
||||
2 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
|
||||
|
||||
== verify zeroes after sub-cluster pattern ==
|
||||
read 2560/2560 bytes at offset 1024
|
||||
2 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
|
||||
*** done
|
Loading…
Add table
Add a link
Reference in a new issue