summaryrefslogtreecommitdiffstats
path: root/tests/qemu-iotests/common.pattern
diff options
context:
space:
mode:
authorKevin Wolf <kwolf@redhat.com>2009-10-01 14:30:19 -0300
committerKevin Wolf <kwolf@redhat.com>2012-02-22 16:17:02 +0100
commitac5e2b201b11e552182b87c34970448e65f23c70 (patch)
treee229a67021efe9f3df2bb4b02f344a94ad3946f2 /tests/qemu-iotests/common.pattern
parent3da9c8fb028e48acd4872efb27c5101704563802 (diff)
downloadhqemu-ac5e2b201b11e552182b87c34970448e65f23c70.zip
hqemu-ac5e2b201b11e552182b87c34970448e65f23c70.tar.gz
qemu-iotests: test larger clusters sizes on qcow2
This patch adds test case 023 which tests some more cluster sizes. For anythinger larger than 4k clusters we can't use requests that are l2_size or more (128k for 1k clusters, 2 MB for 4k clusters, 512 MB for 64k clusters). Therefore one of the common.pattern cases is changed and needs new expected results for some old test cases. Signed-off-by: Kevin Wolf <kwolf@redhat.com> Signed-off-by: Christoph Hellwig <hch@lst.de>
Diffstat (limited to 'tests/qemu-iotests/common.pattern')
-rw-r--r--tests/qemu-iotests/common.pattern5
1 files changed, 3 insertions, 2 deletions
diff --git a/tests/qemu-iotests/common.pattern b/tests/qemu-iotests/common.pattern
index 6d05651..a40d0d0 100644
--- a/tests/qemu-iotests/common.pattern
+++ b/tests/qemu-iotests/common.pattern
@@ -95,8 +95,9 @@ function io_test() {
# Spanning multiple L2 tables
# L2 table size: 512 clusters of 4k = 2M
- io "$op" $((offset + $half_cluster)) $((2 * l2_size)) 4999680 $num_large
- offset=$((offset + num_large * (2 * l2_size + 512 * 1573)))
+ offset=$(( ((offset + l2_size - 1) & ~(l2_size - 1)) - (3 * half_cluster) ))
+ io "$op" $offset $((6 * half_cluster)) $(( l2_size + half_cluster )) $num_large
+ offset=$((offset + num_large * ( l2_size + half_cluster )))
}
function io_test2() {
OpenPOWER on IntegriCloud