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>
This commit is contained in:
Kevin Wolf 2009-10-01 14:29:59 -03:00
parent 3b5fe6e60c
commit 8fc1024cee
10 changed files with 59 additions and 42 deletions

View file

@ -46,6 +46,7 @@ _supported_fmt qcow2
_supported_os Linux
TEST_OFFSETS="10485760 4294967296"
CLUSTER_SIZE="4096"
_make_test_img 6G
@ -54,8 +55,8 @@ echo
for offset in $TEST_OFFSETS; do
echo "At offset $offset:"
io_test "write -b" $offset
io_test "read -b" $offset
io_test "write -b" $offset $CLUSTER_SIZE 8
io_test "read -b" $offset $CLUSTER_SIZE 8
_check_test_img
done