On 25.07.19 18:27, Max Reitz wrote: > On 25.07.19 17:30, Maxim Levitsky wrote: >> On Wed, 2019-07-24 at 19:12 +0200, Max Reitz wrote: >>> Add a test case for converting an empty image (which only returns zeroes >>> when read) to a preallocated encrypted qcow2 image. >>> qcow2_has_zero_init() should return 0 then, thus forcing qemu-img >>> convert to create zero clusters. >>> >>> Signed-off-by: Max Reitz <mre...@redhat.com> >>> Acked-by: Stefano Garzarella <sgarz...@redhat.com> >>> Tested-by: Stefano Garzarella <sgarz...@redhat.com> >>> --- >>> tests/qemu-iotests/188 | 20 +++++++++++++++++++- >>> tests/qemu-iotests/188.out | 4 ++++ >>> 2 files changed, 23 insertions(+), 1 deletion(-) >>> >>> diff --git a/tests/qemu-iotests/188 b/tests/qemu-iotests/188 >>> index be7278aa65..afca44df54 100755 >>> --- a/tests/qemu-iotests/188 >>> +++ b/tests/qemu-iotests/188 >>> @@ -48,7 +48,7 @@ SECRETALT="secret,id=sec0,data=platypus" >>> >>> _make_test_img --object $SECRET -o >>> "encrypt.format=luks,encrypt.key-secret=sec0,encrypt.iter-time=10" $size >>> >>> -IMGSPEC="driver=$IMGFMT,file.filename=$TEST_IMG,encrypt.key-secret=sec0" >>> +IMGSPEC="driver=$IMGFMT,encrypt.key-secret=sec0,file.filename=$TEST_IMG" >> This change I think doesn't change anything
Just noticed now: Yes, it does; it puts the TEST_IMG at end so we can append to it... [...] >>> + >>> +$QEMU_IMG convert -O "$IMGFMT" --object $SECRET \ >>> + -o >>> "encrypt.format=luks,encrypt.key-secret=sec0,encrypt.iter-time=10,preallocation=metadata" >>> \ >>> + "${TEST_IMG}.orig" "$TEST_IMG" >>> + >>> +$QEMU_IMG compare --object $SECRET --image-opts "${IMGSPEC}.orig" >>> "$IMGSPEC" ...right here. Max
signature.asc
Description: OpenPGP digital signature