]> git.ipfire.org Git - thirdparty/qemu.git/commit
tests: Add iotest mirror-sparse for recent patches
authorEric Blake <eblake@redhat.com>
Fri, 9 May 2025 20:40:30 +0000 (15:40 -0500)
committerEric Blake <eblake@redhat.com>
Thu, 15 May 2025 02:23:04 +0000 (21:23 -0500)
commitc0ddcb2cbc146e64f666eaae4edc7b5db7e5814d
treebbb7da79b574a091b008f63a5a45c12f2ff8bbd6
parentbe9bac072ede6e6aa27079f59efcf17b56bd7b26
tests: Add iotest mirror-sparse for recent patches

Prove that blockdev-mirror can now result in sparse raw destination
files, regardless of whether the source is raw or qcow2.  By making
this a separate test, it was possible to test effects of individual
patches for the various pieces that all have to work together for a
sparse mirror to be successful.

Note that ./check -file produces different job lengths than ./check
-qcow2 (the test uses a filter to normalize); that's because when
deciding how much of the image to be mirrored, the code looks at how
much of the source image was allocated (for qcow2, this is only the
written clusters; for raw, it is the entire file).  But the important
part is that the destination file ends up smaller than 3M, rather than
the 20M it used to be before this patch series.

Signed-off-by: Eric Blake <eblake@redhat.com>
Message-ID: <20250509204341.3553601-28-eblake@redhat.com>
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
tests/qemu-iotests/tests/mirror-sparse [new file with mode: 0755]
tests/qemu-iotests/tests/mirror-sparse.out [new file with mode: 0644]