summaryrefslogtreecommitdiff
path: root/tests/qemu-iotests/common.rc
diff options
context:
space:
mode:
authorKevin Wolf <kwolf@redhat.com>2009-10-01 14:29:59 -0300
committerKevin Wolf <kwolf@redhat.com>2012-02-22 16:17:02 +0100
commit8fc1024ceec96d2ec2d2a0296220075e06a6c756 (patch)
tree36933fcfcb4467e39a8122e890189c44d0b739dc /tests/qemu-iotests/common.rc
parent3b5fe6e60c4e2d4b47425ba967a48cd216efd6f8 (diff)
downloadqemu-8fc1024ceec96d2ec2d2a0296220075e06a6c756.tar.gz
qemu-iotests: align test requests according to cluster size
Change the io_test and io_test2 functions to take the cluster size of the image and the number of test requests to issue. Tests are changed to specify a cluster size (usually 4k), but expected test results stay the same for now (apart from qemu-img printing the cluster size now). Based on a patch written by Christoph Hellwig. Signed-off-by: Kevin Wolf <kwolf@redhat.com> Signed-off-by: Christoph Hellwig <hch@lst.de>
Diffstat (limited to 'tests/qemu-iotests/common.rc')
-rw-r--r--tests/qemu-iotests/common.rc4
1 files changed, 4 insertions, 0 deletions
diff --git a/tests/qemu-iotests/common.rc b/tests/qemu-iotests/common.rc
index 6ef6b512e3..0a7ba006e5 100644
--- a/tests/qemu-iotests/common.rc
+++ b/tests/qemu-iotests/common.rc
@@ -55,6 +55,10 @@ _make_test_img()
# at least one argument (the image size) needs to be added
local extra_img_options=$*
+ if [ "$IMGFMT" = "qcow2" -a -n "$CLUSTER_SIZE" ]; then
+ extra_img_options="-o cluster_size=$CLUSTER_SIZE $extra_img_options"
+ fi
+
# XXX(hch): have global image options?
$QEMU_IMG create -f $IMGFMT $TEST_IMG $extra_img_options | \
sed -e "s#$TEST_DIR#TEST_DIR#g" | \