qemu-iotests: 019: Make cluster size dynamic
authorKevin Wolf <kwolf@redhat.com>
Thu, 1 Oct 2009 17:30:13 +0000 (14:30 -0300)
committerKevin Wolf <kwolf@redhat.com>
Wed, 22 Feb 2012 15:17:02 +0000 (16:17 +0100)
Change the offsets for test requests according to CLUSTER_SIZE.

Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
tests/qemu-iotests/019
tests/qemu-iotests/021 [changed mode: 0644->0755]

index c3bf950..20893c5 100755 (executable)
@@ -60,7 +60,7 @@ for offset in $TEST_OFFSETS; do
     io writev $(( offset )) 512 1024 64
 
     # Complete backing clusters
-    io writev $(( offset  + 1024 * 1024))  65536 65536 1
+    io writev $(( offset  + 1024 * 1024))  $CLUSTER_SIZE $CLUSTER_SIZE 1
 done
 _check_test_img
 
@@ -78,7 +78,7 @@ for offset in $TEST_OFFSETS; do
     io writev $(( offset + 512 )) 512 1024 64
 
     # Complete test image clusters
-    io writev $(( offset + 1024 * 1024 + 65536))  65536 65536 1
+    io writev $(( offset + 1024 * 1024 + $CLUSTER_SIZE))  $CLUSTER_SIZE $CLUSTER_SIZE 1
 done
 _check_test_img
 
@@ -89,7 +89,7 @@ echo "Checking if backing clusters are allocated when they shouldn't"
 echo
 for offset in $TEST_OFFSETS; do
     # Complete backing clusters
-    is_allocated $(( offset  + 1024 * 1024))  65536 65536 1
+    is_allocated $(( offset  + 1024 * 1024))  $CLUSTER_SIZE $CLUSTER_SIZE 1
 done
 
 echo "Reading"
@@ -101,11 +101,11 @@ for offset in $TEST_OFFSETS; do
     io readv $(( offset + 512 )) 512 1024 64
 
     # Complete test image clusters
-    io readv $(( offset  + 1024 * 1024))  65536 65536 1
-    io readv $(( offset + 1024 * 1024 + 65536))  65536 65536 1
+    io readv $(( offset  + 1024 * 1024))  $CLUSTER_SIZE $CLUSTER_SIZE 1
+    io readv $(( offset + 1024 * 1024 + $CLUSTER_SIZE))  $CLUSTER_SIZE $CLUSTER_SIZE 1
 
     # Empty sectors
-    io_zero readv $(( offset + 1024 * 1024 + 65536 * 4 )) 65536 65536 1
+    io_zero readv $(( offset + 1024 * 1024 + $CLUSTER_SIZE * 4 )) $CLUSTER_SIZE $CLUSTER_SIZE 1
 done
 _check_test_img
 
old mode 100644 (file)
new mode 100755 (executable)