From cf6e1fc3a8d7806a97055b5f483cf50f58c8294f Mon Sep 17 00:00:00 2001
From: chandan chan...@linux.vnet.ibm.com
Date: Thu, 8 Aug 2013 11:33:10 +0530
Subject: [PATCH] _test_generic_punch: Extend $testfile's size to work with 64k
block.
The current script does not work with 64k block size. This patch fixes it
by creating a larger $testfile.
Signed-off-by: chandan chan...@linux.vnet.ibm.com
---
common/punch | 119 +++--
tests/generic/255.out | 476 +-
tests/xfs/242.out | 118 ++---
tests/xfs/252.out | 476 +-
4 files changed, 594 insertions(+), 595 deletions(-)
diff --git a/common/punch b/common/punch
index d8f73d0..e6f0b2a 100644
--- a/common/punch
+++ b/common/punch
@@ -316,8 +316,8 @@ _test_generic_punch()
if [ $remove_testfile ]; then
rm -f $testfile
fi
- $XFS_IO_PROG -f -c truncate 20k \
- -c $zero_cmd 4k 8k \
+ $XFS_IO_PROG -f -c truncate 320k \
+ -c $zero_cmd 64k 128k \
-c $map_cmd -v $testfile | $filter_cmd
[ $? -ne 0 ] die_now
_md5_checksum $testfile
@@ -326,9 +326,9 @@ _test_generic_punch()
if [ $remove_testfile ]; then
rm -f $testfile
fi
- $XFS_IO_PROG -f -c truncate 20k \
- -c pwrite 0 20k $sync_cmd \
- -c $zero_cmd 4k 8k \
+ $XFS_IO_PROG -f -c truncate 320k \
+ -c pwrite 0 320k $sync_cmd \
+ -c $zero_cmd 64k 128k \
-c $map_cmd -v $testfile | $filter_cmd
[ $? -ne 0 ] die_now
_md5_checksum $testfile
@@ -337,9 +337,9 @@ _test_generic_punch()
if [ $remove_testfile ]; then
rm -f $testfile
fi
- $XFS_IO_PROG -f -c truncate 20k \
- -c $alloc_cmd 0 20k \
- -c $zero_cmd 4k 8k \
+ $XFS_IO_PROG -f -c truncate 320k \
+ -c $alloc_cmd 0 320k \
+ -c $zero_cmd 64k 128k \
-c $map_cmd -v $testfile | $filter_cmd
[ $? -ne 0 ] die_now
_md5_checksum $testfile
@@ -348,9 +348,9 @@ _test_generic_punch()
if [ $remove_testfile ]; then
rm -f $testfile
fi
- $XFS_IO_PROG -f -c truncate 20k \
- -c pwrite 8k 8k $sync_cmd \
- -c $zero_cmd 4k 8k \
+ $XFS_IO_PROG -f -c truncate 320k \
+ -c pwrite 128k 128k $sync_cmd \
+ -c $zero_cmd 64k 128k \
-c $map_cmd -v $testfile | $filter_cmd
[ $? -ne 0 ] die_now
_md5_checksum $testfile
@@ -359,9 +359,9 @@ _test_generic_punch()
if [ $remove_testfile ]; then
rm -f $testfile
fi
- $XFS_IO_PROG -f -c truncate 20k \
- -c $alloc_cmd 8k 8k \
- -c $zero_cmd 4k 8k \
+ $XFS_IO_PROG -f -c truncate 320k \
+ -c $alloc_cmd 128k 128k \
+ -c $zero_cmd 64k 128k \
-c $map_cmd -v $testfile | $filter_cmd
[ $? -ne 0 ] die_now
_md5_checksum $testfile
@@ -370,9 +370,9 @@ _test_generic_punch()
if [ $remove_testfile ]; then
rm -f $testfile
fi
- $XFS_IO_PROG -f -c truncate 20k \
- -c pwrite 0 8k $sync_cmd \
- -c $zero_cmd 4k 8k \
+ $XFS_IO_PROG -f -c truncate 320k \
+ -c pwrite 0 128k $sync_cmd \
+ -c $zero_cmd 64k 128k \
-c $map_cmd -v $testfile | $filter_cmd
[ $? -ne 0 ] die_now
_md5_checksum $testfile
@@ -381,10 +381,10 @@ _test_generic_punch()
if [ $remove_testfile ]; then
rm -f $testfile
fi
- $XFS_IO_PROG -f -c truncate 20k \
- -c pwrite 0 8k $sync_cmd \
- -c $alloc_cmd 8k 8k \
- -c $zero_cmd 4k 8k \
+ $XFS_IO_PROG -f -c truncate 320k \
+ -c pwrite 0 128k $sync_cmd \
+ -c $alloc_cmd 128k 128k \
+ -c $zero_cmd 64k 128k \
-c $map_cmd -v $testfile | $filter_cmd
[ $? -ne 0 ] die_now
_md5_checksum $testfile
@@ -393,9 +393,9 @@ _test_generic_punch()
if [ $remove_testfile ]; then
rm -f $testfile
fi
- $XFS_IO_PROG -f -c truncate 20k \
- -c $alloc_cmd 0 8k \
- -c $zero_cmd 4k 8k \
+ $XFS_IO_PROG -f -c truncate 320k \
+ -c $alloc_cmd 0 128k \
+ -c $zero_cmd 64k 128k \
-c $map_cmd -v $testfile | $filter_cmd
[ $? -ne 0 ] die_now
_md5_checksum $testfile
@@ -404,10 +404,10 @@ _test_generic_punch()
if [ $remove_testfile ]; then
rm -f $testfile
fi
- $XFS_IO_PROG -f -c truncate 20k \
- -c $alloc_cmd 0 8k \
- -c pwrite 8k 8k $sync_cmd \
- -c $zero_cmd 4k 8k