aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRitesh Harjani (IBM) <ritesh.list@gmail.com>2024-01-22 13:51:20 +0530
committerZorro Lang <zlang@kernel.org>2024-02-09 13:27:17 +0800
commitd99636b8efdc217bfb3ba9348ddfb45cb89326ab (patch)
treed72b8ee4fde82251bd79a31b3b887fe1306710a0
parentcf72e89fdc2d4e95cca55ff0cdb124f16a4d5f9f (diff)
downloadxfstests-dev-d99636b8efdc217bfb3ba9348ddfb45cb89326ab.tar.gz
xfs/604: Make test as _notrun for higher blocksizes filesystem
If we have filesystem with blocksize = 64k, then the falloc value will be huge (falloc_size=5451.33GB) which makes fallocate fail hence causing the test to fail. Instead make the testcase "_notrun" if the initial fallocate itself fails. Signed-off-by: "Ritesh Harjani (IBM)" <ritesh.list@gmail.com> Reviewed-by: "Darrick J. Wong" <djwong@kernel.org> Signed-off-by: Zorro Lang <zlang@kernel.org>
-rwxr-xr-xtests/xfs/6044
1 files changed, 3 insertions, 1 deletions
diff --git a/tests/xfs/604 b/tests/xfs/604
index bb6db797e5..fdc444c220 100755
--- a/tests/xfs/604
+++ b/tests/xfs/604
@@ -35,7 +35,9 @@ allocbt_node_maxrecs=$(((dbsize - alloc_block_len) / 12))
# Create a big file with a size such that the punches below create the exact
# free extents we want.
num_holes=$((allocbt_leaf_maxrecs * allocbt_node_maxrecs - 1))
-$XFS_IO_PROG -c "falloc 0 $((9 * dbsize + num_holes * dbsize * 2))" -f "$SCRATCH_MNT/big"
+falloc_size=$((9 * dbsize + num_holes * dbsize * 2))
+$XFS_IO_PROG -c "falloc 0 $falloc_size" -f "$SCRATCH_MNT/big" ||
+ _notrun "Not enough space on device for falloc_size=$(echo "scale=2; $falloc_size / 1073741824" | $BC -q)GB and bs=$dbsize"
# Fill in any small free extents in AG 0. After this, there should be only one,
# large free extent.