iotests/109: Don't mirror with mismatched size
commitffa41a62d0b0e6d91f2071328befa046d56993e1
authorKevin Wolf <kwolf@redhat.com>
Mon, 11 May 2020 13:58:22 +0000 (11 15:58 +0200)
committerKevin Wolf <kwolf@redhat.com>
Mon, 18 May 2020 17:05:24 +0000 (18 19:05 +0200)
treec1af286921fac8d0d5ac9b5168f1f22960ca6518
parentdebe78ce14bf8f8940c2bdf3ef387505e9e035a9
iotests/109: Don't mirror with mismatched size

This patch makes the raw image the same size as the file in a different
format that is mirrored as raw to it to avoid errors when mirror starts
to enforce that source and target are the same size.

We check only that the first 512 bytes are zeroed (instead of 64k)
because some image formats create image files that are smaller than 64k,
so trying to read 64k would result in I/O errors. Apart from this, 512
is more appropriate anyway because the raw format driver protects
specifically the first 512 bytes.

Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Message-Id: <20200511135825.219437-2-kwolf@redhat.com>
Reviewed-by: Max Reitz <mreitz@redhat.com>
Reviewed-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
tests/qemu-iotests/109
tests/qemu-iotests/109.out
tests/qemu-iotests/common.filter