diff --git a/tests/qemu-iotests/015 b/tests/qemu-iotests/015 index bdafd2629341c67d591566f4266934b9fe0a1056..44c134f94873436332a16f5cf00b36e4133a3b35 100755 --- a/tests/qemu-iotests/015 +++ b/tests/qemu-iotests/015 @@ -56,7 +56,8 @@ echo "creating image" # for the refcount table. On the other hand this is big enough to cause a # refcount table growth when rewriting the image after creating one snapshot. size=36M -_make_test_img -o cluster_size=1k $size +CLUSTER_SIZE=1k +_make_test_img $size # Create two snapshots which fill the image with two different patterns echo "creating first snapshot" diff --git a/tests/qemu-iotests/common.rc b/tests/qemu-iotests/common.rc index cdefafc62fa5ed26b5e866a2192661731c17cdc6..26811ca660b65a8c8d4a9a9106c2ea37e7313465 100644 --- a/tests/qemu-iotests/common.rc +++ b/tests/qemu-iotests/common.rc @@ -58,9 +58,11 @@ _make_test_img() # extra qemu-img options can be added by tests # at least one argument (the image size) needs to be added local extra_img_options=$* + local cluster_size_filter="s# cluster_size=[0-9]\\+##g" if [ \( "$IMGFMT" = "qcow2" -o "$IMGFMT" = "qed" \) -a -n "$CLUSTER_SIZE" ]; then extra_img_options="-o cluster_size=$CLUSTER_SIZE $extra_img_options" + cluster_size_filter="" fi # XXX(hch): have global image options? @@ -69,7 +71,7 @@ _make_test_img() sed -e "s#$TEST_DIR#TEST_DIR#g" | \ sed -e "s#$IMGFMT#IMGFMT#g" | \ sed -e "s# encryption=off##g" | \ - sed -e "s# cluster_size=0##g" | \ + sed -e "$cluster_size_filter" | \ sed -e "s# table_size=0##g" | \ sed -e "s# compat6=off##g" | \ sed -e "s# static=off##g"