From ac5e2b201b11e552182b87c34970448e65f23c70 Mon Sep 17 00:00:00 2001 From: Kevin Wolf Date: Thu, 1 Oct 2009 14:30:19 -0300 Subject: 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 Signed-off-by: Christoph Hellwig --- tests/qemu-iotests/common.pattern | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'tests/qemu-iotests/common.pattern') 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() { -- cgit v1.1