fstests: add missing checks of fallocate feature

Many test cases use xfs_io -c 'falloc' but forgot to add
_require_xfs_io_command "falloc". This will fail the test case if we
run the test case on a file system without fallcoate support e.g.
F2FS.

While we believe that normal fallocate(mode = 0) is always supported
on Linux, it is not true. Fallocate is disabled in several
implementations of zoned block support for file systems because the
pre-allocated region will break the sequential writing rule.

Currently, several test cases unconditionally call fallocate().
Let's add _require_xfs_io_command "falloc" to properly check the
feature is supported by a testing file system.

Signed-off-by: Naohiro Aota <naohiro.aota@wdc.com>
Reviewed-by: Eryu Guan <guaneryu@gmail.com>
Signed-off-by: Eryu Guan <guaneryu@gmail.com>
This commit is contained in:
Naohiro Aota
2021-04-23 20:26:31 +09:00
committed by Eryu Guan
parent bd5aba84ff
commit 74e99aebdc
17 changed files with 17 additions and 0 deletions
+1
View File
@@ -33,6 +33,7 @@ trap "_cleanup ; exit \$status" 0 1 2 3 15
# real QA test starts here
_supported_fs btrfs
_require_scratch
_require_xfs_io_command "falloc"
rm -f $seqres.full
+1
View File
@@ -35,6 +35,7 @@ _supported_fs btrfs
_require_test
_require_scratch
_require_fssum
_require_xfs_io_command "falloc"
_scratch_mkfs > /dev/null 2>&1
+1
View File
@@ -31,6 +31,7 @@ _cleanup()
# real QA test starts here
_supported_fs btrfs
_require_scratch
_require_xfs_io_command "falloc"
rm -f $seqres.full
+1
View File
@@ -28,6 +28,7 @@ _cleanup()
# real QA test starts here
_supported_fs btrfs
_require_scratch
_require_xfs_io_command "falloc"
rm -f $seqres.full
+1
View File
@@ -35,6 +35,7 @@ _cleanup()
# real QA test starts here
_supported_fs btrfs
_require_scratch
_require_xfs_io_command "falloc"
rm -f $seqres.full
+1
View File
@@ -37,6 +37,7 @@ _cleanup()
_supported_fs btrfs
_require_test
_require_scratch
_require_xfs_io_command "falloc"
_require_fssum
rm -f $seqres.full
+1
View File
@@ -34,6 +34,7 @@ rm -f $seqres.full
_supported_fs btrfs
_require_scratch
_require_xfs_io_command "falloc"
# Use 64K file size to match any sectorsize
# And with a unaligned tailing range to ensure it will be at least 2 pages
+1
View File
@@ -29,6 +29,7 @@ trap "_cleanup ; exit \$status" 0 1 2 3 15
# real QA test starts here
_supported_fs ext4
_require_xfs_io_command "falloc"
_require_xfs_io_command "fzero"
_require_test
+1
View File
@@ -36,6 +36,7 @@ _cleanup()
_supported_fs f2fs
_require_scratch
_require_xfs_io_command "falloc"
testfile=$SCRATCH_MNT/testfile
dummyfile=$SCRATCH_MNT/dummyfile
+1
View File
@@ -38,6 +38,7 @@ trap "_cleanup; exit \$status" 0 1 2 3 15
# real QA test starts here
_supported_fs generic
_require_scratch
_require_xfs_io_command "falloc"
_require_dm_target flakey
_require_xfs_io_command "falloc" "-k"
_require_xfs_io_command "fzero"
+1
View File
@@ -31,6 +31,7 @@ trap "_cleanup ; exit \$status" 0 1 2 3 15
# real QA test starts here
_supported_fs xfs
_require_xfs_io_command "falloc"
_require_scratch
+1
View File
@@ -32,6 +32,7 @@ _cleanup()
_supported_fs xfs
_require_test_program "punch-alternating"
_require_xfs_scratch_rmapbt
_require_xfs_io_command "falloc"
_require_xfs_io_command "fcollapse"
_require_xfs_io_command "finsert"
+1
View File
@@ -41,6 +41,7 @@ _supported_fs xfs
_require_scratch
_require_command "$XFS_FSR_PROG" "xfs_fsr"
_require_xfs_io_command "falloc"
# 50M
_scratch_mkfs_sized $((50 * 1024 * 1024)) >> $seqres.full 2>&1
+1
View File
@@ -33,6 +33,7 @@ _require_xfs_scratch_rmapbt
_require_scratch_reflink
_require_xfs_io_command "falloc"
_require_test_program "punch-alternating"
_require_xfs_io_command "falloc"
rm -f "$seqres.full"
+1
View File
@@ -31,6 +31,7 @@ _require_realtime
_require_xfs_scratch_rmapbt
_require_test_program "punch-alternating"
_disable_dmesg_check
_require_xfs_io_command "falloc"
rm -f "$seqres.full"
+1
View File
@@ -30,6 +30,7 @@ _supported_fs xfs
_require_realtime
_require_xfs_scratch_rmapbt
_require_test_program "punch-alternating"
_require_xfs_io_command "falloc"
rm -f "$seqres.full"
+1
View File
@@ -35,6 +35,7 @@ _cleanup()
_supported_fs xfs
_require_test_program "punch-alternating"
_require_xfs_io_command "scrub"
_require_xfs_io_command "falloc"
_require_scratch
echo "Format and populate"