summaryrefslogtreecommitdiffstats
path: root/tests/qemu-iotests/013
diff options
context:
space:
mode:
authorKevin Wolf2009-10-01 19:29:59 +0200
committerKevin Wolf2012-02-22 16:17:02 +0100
commit8fc1024ceec96d2ec2d2a0296220075e06a6c756 (patch)
tree36933fcfcb4467e39a8122e890189c44d0b739dc /tests/qemu-iotests/013
parentqemu-iotests: add support for vdi format "static" option (diff)
downloadqemu-8fc1024ceec96d2ec2d2a0296220075e06a6c756.tar.gz
qemu-8fc1024ceec96d2ec2d2a0296220075e06a6c756.tar.xz
qemu-8fc1024ceec96d2ec2d2a0296220075e06a6c756.zip
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/013')
-rwxr-xr-xtests/qemu-iotests/0139
1 files changed, 5 insertions, 4 deletions
diff --git a/tests/qemu-iotests/013 b/tests/qemu-iotests/013
index 565071fd91..bd9fdefaf9 100755
--- a/tests/qemu-iotests/013
+++ b/tests/qemu-iotests/013
@@ -1,6 +1,6 @@
#!/bin/sh
#
-# qcow2 pattern test, empty and compressed image
+# qcow2 pattern test, empty and compressed image - 4k cluster patterns
#
# Copyright (C) 2009 Red Hat, Inc.
#
@@ -45,6 +45,7 @@ _supported_os Linux
TEST_OFFSETS="0 4294967296"
TEST_OPS="writev read write readv"
+CLUSTER_SIZE=4096
_make_test_img 6G
@@ -54,7 +55,7 @@ echo
for offset in $TEST_OFFSETS; do
echo "At offset $offset:"
for op in $TEST_OPS; do
- io_test $op $offset
+ io_test $op $offset $CLUSTER_SIZE 8
done
_check_test_img
done
@@ -72,7 +73,7 @@ echo
for offset in $TEST_OFFSETS; do
echo "With offset $offset:"
for op in read readv; do
- io_test $op $offset
+ io_test $op $offset $CLUSTER_SIZE 8
done
_check_test_img
done
@@ -85,7 +86,7 @@ for offset in $TEST_OFFSETS; do
offset=$((offset + 512))
echo "With offset $offset:"
for op in $TEST_OPS; do
- io_test $op $offset
+ io_test $op $offset $CLUSTER_SIZE 8
done
_check_test_img
done