diff options
author | Kevin Wolf <kwolf@redhat.com> | 2018-03-20 15:31:06 +0100 |
---|---|---|
committer | Kevin Wolf <kwolf@redhat.com> | 2018-03-26 12:17:40 +0200 |
commit | 633c175f8cccf647f19cf8954dc46b82ce7926e4 (patch) | |
tree | 7f75f6b9d1df1540a61f26c438a3ecd472f13959 | |
parent | b7de0777dcae2b39f9245cf600ab96e517d83fa3 (diff) | |
download | qemu-633c175f8cccf647f19cf8954dc46b82ce7926e4.zip qemu-633c175f8cccf647f19cf8954dc46b82ce7926e4.tar.gz qemu-633c175f8cccf647f19cf8954dc46b82ce7926e4.tar.bz2 |
qemu-iotests: Enable 025 for luks
We want to test resizing even for luks. The only change that is needed
is to explicitly zero out new space for luks because it's undefined.
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
-rwxr-xr-x | tests/qemu-iotests/025 | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/tests/qemu-iotests/025 b/tests/qemu-iotests/025 index f5e672e..70dd5f1 100755 --- a/tests/qemu-iotests/025 +++ b/tests/qemu-iotests/025 @@ -38,7 +38,7 @@ trap "_cleanup; exit \$status" 0 1 2 3 15 . ./common.filter . ./common.pattern -_supported_fmt raw qcow2 qed +_supported_fmt raw qcow2 qed luks _supported_proto file sheepdog rbd nfs _supported_os Linux @@ -62,6 +62,13 @@ length EOF _check_test_img +# bdrv_truncate() doesn't zero the new space, so we need to do that explicitly. +# We still want to test automatic zeroing for other formats even though +# bdrv_truncate() doesn't guarantee it. +if [ "$IMGFMT" == "luks" ]; then + $QEMU_IO -c "write -z $small_size $((big_size - small_size))" "$TEST_IMG" > /dev/null +fi + echo echo "=== Verifying image size after reopen" $QEMU_IO -c "length" "$TEST_IMG" |