aboutsummaryrefslogtreecommitdiff
path: root/tests/qemu-iotests/014
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/014
parent3b5fe6e60c4e2d4b47425ba967a48cd216efd6f8 (diff)
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/014')
-rwxr-xr-xtests/qemu-iotests/0146
1 files changed, 4 insertions, 2 deletions
diff --git a/tests/qemu-iotests/014 b/tests/qemu-iotests/014
index d7f50afcd5..ee7bf2176a 100755
--- a/tests/qemu-iotests/014
+++ b/tests/qemu-iotests/014
@@ -1,6 +1,7 @@
#!/bin/sh
#
# qcow2 pattern test, complex patterns including compression and snapshots
+# Using patterns for 4k cluster size.
#
#
# Copyright (C) 2009 Red Hat, Inc.
@@ -46,13 +47,14 @@ _supported_os Linux
TEST_OFFSETS="0 4294967296"
TEST_OPS="writev read write readv"
+CLUSTER_SIZE=4096
_make_test_img 6G
echo "Testing empty image:"
for offset in $TEST_OFFSETS; do
echo test2: With offset $offset
- io_test2 $offset
+ io_test2 $offset $CLUSTER_SIZE 256
_check_test_img
done
@@ -62,7 +64,7 @@ for i in `seq 1 3`; do
for offset in $TEST_OFFSETS; do
echo With snapshot test$i, offset $offset
for op in $TEST_OPS; do
- io_test $op $offset
+ io_test $op $offset $CLUSTER_SIZE 8
done
_check_test_img
done