mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-07 17:53:56 -06:00
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:
parent
3b5fe6e60c
commit
8fc1024cee
10 changed files with 59 additions and 42 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue