xfstests: _test_generic_punch: Obtain block size from $TEST_DIR
authorchandan <chandan@linux.vnet.ibm.com>
Wed, 28 Aug 2013 06:24:10 +0000 (06:24 +0000)
committerRich Johnston <rjohnston@sgi.com>
Thu, 29 Aug 2013 14:14:34 +0000 (09:14 -0500)
The current code incorrectly gets block size information from $TEST_DEV
instead of from $TEST_DIR. This returns the block size of the filesystem
hosting the device file rather than that of the filesystem on $TEST_DEV.

Signed-off-by: chandan <chandan@linux.vnet.ibm.com>
Reviewed-by: Eric Sandeen <sandeen@redhat.com>
Signed-off-by: Rich Johnston <rjohnston@sgi.com>
common/punch

index 7b3c00991989f5d136456632f84af2a605c35604..a49638ce4620179ab9c5fe85175d11ddd09deccf 100644 (file)
@@ -520,7 +520,7 @@ _test_generic_punch()
        if [ "$remove_testfile" ]; then
                rm -f $testfile
        fi
-       block_size=`stat -f $TEST_DEV | grep "Block size" | cut -d " " -f3`
+       block_size=`stat -f $TEST_DIR | grep "Block size" | cut -d " " -f3`
        $XFS_IO_PROG -f -c "truncate $block_size" \
                -c "pwrite 0 $block_size" $sync_cmd \
                -c "$zero_cmd 128 128" \