mirror of
https://github.com/linux-apfs/apfstests.git
synced 2026-05-01 15:01:44 -07:00
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:
@@ -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
|
||||
|
||||
|
||||
@@ -35,6 +35,7 @@ _supported_fs btrfs
|
||||
_require_test
|
||||
_require_scratch
|
||||
_require_fssum
|
||||
_require_xfs_io_command "falloc"
|
||||
|
||||
_scratch_mkfs > /dev/null 2>&1
|
||||
|
||||
|
||||
@@ -31,6 +31,7 @@ _cleanup()
|
||||
# real QA test starts here
|
||||
_supported_fs btrfs
|
||||
_require_scratch
|
||||
_require_xfs_io_command "falloc"
|
||||
|
||||
rm -f $seqres.full
|
||||
|
||||
|
||||
@@ -28,6 +28,7 @@ _cleanup()
|
||||
# real QA test starts here
|
||||
_supported_fs btrfs
|
||||
_require_scratch
|
||||
_require_xfs_io_command "falloc"
|
||||
|
||||
rm -f $seqres.full
|
||||
|
||||
|
||||
@@ -35,6 +35,7 @@ _cleanup()
|
||||
# real QA test starts here
|
||||
_supported_fs btrfs
|
||||
_require_scratch
|
||||
_require_xfs_io_command "falloc"
|
||||
|
||||
rm -f $seqres.full
|
||||
|
||||
|
||||
@@ -37,6 +37,7 @@ _cleanup()
|
||||
_supported_fs btrfs
|
||||
_require_test
|
||||
_require_scratch
|
||||
_require_xfs_io_command "falloc"
|
||||
_require_fssum
|
||||
|
||||
rm -f $seqres.full
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -36,6 +36,7 @@ _cleanup()
|
||||
|
||||
_supported_fs f2fs
|
||||
_require_scratch
|
||||
_require_xfs_io_command "falloc"
|
||||
|
||||
testfile=$SCRATCH_MNT/testfile
|
||||
dummyfile=$SCRATCH_MNT/dummyfile
|
||||
|
||||
@@ -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"
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -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"
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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"
|
||||
|
||||
|
||||
@@ -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"
|
||||
|
||||
|
||||
@@ -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"
|
||||
|
||||
|
||||
@@ -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"
|
||||
|
||||
Reference in New Issue
Block a user