On Fri, May 09, 2025 at 03:40:30PM -0500, Eric Blake wrote:
> 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 <ebl...@redhat.com>
> 
> ---
> 
> v3: Improve test with more cases
> v4: drop -machine q35 from command line [Stefan], update to
> match rework in rest of series
> ---
>  tests/qemu-iotests/tests/mirror-sparse     | 125 +++++++
>  tests/qemu-iotests/tests/mirror-sparse.out | 365 +++++++++++++++++++++
>  2 files changed, 490 insertions(+)
>  create mode 100755 tests/qemu-iotests/tests/mirror-sparse
>  create mode 100644 tests/qemu-iotests/tests/mirror-sparse.out

Reviewed-by: Stefan Hajnoczi <stefa...@redhat.com>

Attachment: signature.asc
Description: PGP signature

Reply via email to