exit 1
}
-# tests whether $FSTYP is one of the supported filesystems for a test
#
-_check_supported_fs()
-{
- local res=1
- local f
-
- for f; do
- # ^FS means black listed fs
- if [ "$f" = "^$FSTYP" ]; then
- return 1
- elif [ "$f" = "generic" ] || [[ "$f" == "^"* ]]; then
- # ^FS implies "generic ^FS"
- res=0
- elif [ "$f" = "$FSTYP" ]; then
- return 0
- fi
- done
- return $res
-}
-
-_supported_fs()
+# Tests whether $FSTYP should be exclude from this test.
+#
+# In general this should be avoided in favor of feature tests, and when this
+# helper has to be used, it should include a comment on why a specific file
+# system is excluded.
+#
+_exclude_fs()
{
- _check_supported_fs $* || \
+ [ "$1" = "$FSTYP" ] && \
_notrun "not suitable for this filesystem type: $FSTYP"
}
. ./common/filter
. ./common/punch
-_supported_fs ext4
+_exclude_fs ext2
+_exclude_fs ext3
+
_require_xfs_io_command "falloc"
_require_xfs_io_command "fzero"
_require_test
# Import common functions.
. ./common/filter
-_supported_fs ext4 ext3
+_exclude_fs ext2
_require_scratch_nocheck
_require_scratch_shutdown
# Import common functions.
. ./common/filter
-_supported_fs ext4
+_exclude_fs ext2
+_exclude_fs ext3
_require_scratch
_require_scratch_ext4_feature "bigalloc"
rm -rf restoresymtable
}
-_supported_fs ext4
+_exclude_fs ext2
+_exclude_fs ext3
_require_test
_require_scratch
# Import common functions.
. ./common/filter
-_supported_fs ext4
+_exclude_fs ext2
+_exclude_fs ext3
+
_require_scratch
_require_command "$CHATTR_PROG" chattr
_notrun "Couldn't find e2fuzz"
fi
-_supported_fs ext4
+_exclude_fs ext2
+_exclude_fs ext3
_require_scratch
_require_attrs
. ./common/filter
. ./common/attr
-_supported_fs ext4
+_exclude_fs ext2
+_exclude_fs ext3
_require_scratch
test -n "${FORCE_FUZZ}" || _require_scratch_ext4_crc
. ./common/filter
. ./common/attr
-_supported_fs ext4
+_exclude_fs ext2
+_exclude_fs ext3
_require_scratch
test -n "${FORCE_FUZZ}" || _require_scratch_ext4_crc
. ./common/filter
. ./common/attr
-_supported_fs ext4
+_exclude_fs ext2
+_exclude_fs ext3
_require_xfs_io_command "falloc"
_require_scratch
. ./common/filter
. ./common/attr
-_supported_fs ext4
+_exclude_fs ext2
+_exclude_fs ext3
_require_scratch
_require_dumpe2fs
. ./common/filter
. ./common/attr
-_supported_fs ext4
+_exclude_fs ext2
+_exclude_fs ext3
_require_scratch
test -n "${FORCE_FUZZ}" || _require_scratch_ext4_crc
. ./common/filter
. ./common/attr
-_supported_fs ext4
+_exclude_fs ext2
+_exclude_fs ext3
_require_scratch
test -n "${FORCE_FUZZ}" || _require_scratch_ext4_crc
. ./common/filter
. ./common/attr
-_supported_fs ext4
+_exclude_fs ext2
+_exclude_fs ext3
_require_scratch
test -n "${FORCE_FUZZ}" || _require_scratch_ext4_crc
. ./common/filter
. ./common/attr
-_supported_fs ext4
+_exclude_fs ext2
+_exclude_fs ext3
_require_scratch
test -n "${FORCE_FUZZ}" || _require_scratch_ext4_crc
. ./common/filter
. ./common/attr
-_supported_fs ext4
+_exclude_fs ext2
+_exclude_fs ext3
_require_xfs_io_command "falloc"
_require_xfs_io_command "fpunch"
. ./common/filter
. ./common/attr
-_supported_fs ext4
+_exclude_fs ext2
+_exclude_fs ext3
_require_scratch
test -n "${FORCE_FUZZ}" || _require_scratch_ext4_crc
. ./common/filter
. ./common/attr
-_supported_fs ext4
+_exclude_fs ext2
+_exclude_fs ext3
_require_scratch
test -n "${FORCE_FUZZ}" || _require_scratch_ext4_crc
. ./common/filter
. ./common/attr
-_supported_fs ext4
+_exclude_fs ext2
+_exclude_fs ext3
_require_scratch
test -n "${FORCE_FUZZ}" || _require_scratch_ext4_crc
. ./common/filter
. ./common/attr
-_supported_fs ext4
+_exclude_fs ext2
+_exclude_fs ext3
_require_scratch
test -n "${FORCE_FUZZ}" || _require_scratch_ext4_crc
. ./common/filter
. ./common/defrag
-_supported_fs ext4
+_exclude_fs ext2
+_exclude_fs ext3
+
_require_scratch
_require_defrag
# Import common functions.
-_supported_fs ext4
+_exclude_fs ext2
+_exclude_fs ext3
+
_require_scratch
_require_dumpe2fs
. ./common/filter
. ./common/attr
-_supported_fs ext4
+_exclude_fs ext2
+_exclude_fs ext3
+
_require_scratch
_require_dumpe2fs
_require_command "$DEBUGFS_PROG" debugfs
. ./common/populate
. ./common/fuzzy
-_supported_fs ext4
+_exclude_fs ext2
+_exclude_fs ext3
+
_require_scratch
echo "Format and populate"
# get standard environment and checks
. ./common/encrypt
-_supported_fs ext4
+_exclude_fs ext2
+_exclude_fs ext3
+
_require_scratch_encryption
_require_command "$KEYCTL_PROG" keyctl
# get standard environment and checks
. ./common/filter
-_supported_fs ext4
+_exclude_fs ext2
+_exclude_fs ext3
+
_require_scratch_nocheck
_require_command "$DEBUGFS_PROG" debugfs
_require_scratch_ext4_feature "bigalloc,meta_bg,^resize_inode"
. ./common/filter
. ./common/attr
-_supported_fs ext4
+_exclude_fs ext2
+_exclude_fs ext3
+
_require_scratch
_require_attrs
_require_scratch_ext4_feature "ea_inode"
# Import common functions.
. ./common/filter
-_supported_fs ext4
+_exclude_fs ext2
+_exclude_fs ext3
+
_require_scratch
_require_xfs_io_command "fsmap"
. ./common/filter
. ./common/populate
-_supported_fs ext4
+_exclude_fs ext2
+_exclude_fs ext3
+
_require_scratch
_require_populate_commands
_require_xfs_io_command "fsmap"
# Import common functions.
. ./common/filter
-_supported_fs ext4
+_exclude_fs ext2
+_exclude_fs ext3
+
_require_logdev
_require_scratch
_require_xfs_io_command "fsmap"
. ./common/filter
# Modify as appropriate.
-_supported_fs ext4
+_exclude_fs ext2
+_exclude_fs ext3
+
_require_scratch_dax_mountopt "dax"
_require_test_program "t_ext4_dax_journal_corruption"
_require_command "$CHATTR_PROG" chattr
MOUNT_OPTIONS=""
# Modify as appropriate.
-_supported_fs ext4
+_exclude_fs ext2
+_exclude_fs ext3
+
_require_scratch_dax_mountopt "dax"
_require_test_program "t_ext4_dax_inline_corruption"
_require_scratch_ext4_feature "inline_data"
# get standard environment and checks
-_supported_fs ext4
+_exclude_fs ext2
+_exclude_fs ext3
_require_loop
_require_scratch
. ./common/filter
. ./common/dmhugedisk
-_supported_fs ext4
+_exclude_fs ext2
+_exclude_fs ext3
+
_require_scratch_nocheck
_require_dmhugedisk
_require_dumpe2fs
# Modify as appropriate.
-_supported_fs ext4
+_exclude_fs ext2
+_exclude_fs ext3
_require_scratch
_require_quota
_require_nobody
# Import common functions.
. ./common/filter
-_supported_fs ext4
+_exclude_fs ext2
+_exclude_fs ext3
_require_scratch
_exclude_scratch_mount_option dax
_require_command "$RESIZE2FS_PROG" resize2fs
# Import common functions.
. ./common/filter
-_supported_fs ext3 ext4
+_exclude_fs ext2
+
_require_scratch
echo "Silence is golden"
# Import common functions.
. ./common/filter
-_supported_fs ext3 ext4
+_exclude_fs ext2
# nofsck as we modify sb via debugfs
_require_scratch_nocheck
. ./common/preamble
_begin_fstest auto quick
-# Import common functions.
+_exclude_fs ext2
-_supported_fs ext3 ext4
_require_scratch
_require_command "$DEBUGFS_PROG" debugfs
done
}
-_supported_fs ext3 ext4
+_exclude_fs ext2
+
_require_scratch
_exclude_scratch_mount_option dax
# Import common functions.
. ./common/filter
-_supported_fs ext2 ext3 ext4
_require_scratch_nocheck
_disable_dmesg_check
_require_command "$DEBUGFS_PROG"
# Import common functions.
. ./common/filter
-_supported_fs ext2 ext3 ext4
_require_scratch_nocheck
_disable_dmesg_check
_require_command "$DEBUGFS_PROG"
# Import common functions.
. ./common/filter
-
-# Modify as appropriate.
-_supported_fs ext2 ext3 ext4
_require_scratch
_scratch_mkfs >> $seqres.full 2>&1
# Import common functions.
. ./common/filter
-_supported_fs ext3 ext4
+_exclude_fs ext2
_require_scratch
_require_test_program "t_get_file_time"
# Import common functions.
. ./common/filter
-_supported_fs ext4
+_exclude_fs ext2
+_exclude_fs ext3
+
_require_scratch
_require_test_program "t_get_file_time"
_require_metadata_journaling
# Import common functions.
. ./common/filter
-_supported_fs ext4
+_exclude_fs ext2
+_exclude_fs ext3
_require_scratch
_require_scratch_ext4_feature large_dir
. ./common/filter
_require_check_dmesg
-_supported_fs ext4
+_exclude_fs ext2
+_exclude_fs ext3
_require_scratch
_require_xfs_io_command "falloc"
_require_scratch_size $((6 * 1024 * 1024)) #kB
# Import common functions.
. ./common/filter
-_supported_fs ext4
+_exclude_fs ext2
+_exclude_fs ext3
+
_require_scratch_dax_mountopt "dax=always"
_require_dax_iflag
_require_scratch_ext4_feature "inline_data"
# Import common functions.
. ./common/filter
-_supported_fs ext4
+_exclude_fs ext2
+_exclude_fs ext3
_require_scratch
_require_command "$DEBUGFS_PROG" debugfs
# Import common functions.
. ./common/filter
-_supported_fs ext4
+_exclude_fs ext2
+_exclude_fs ext3
_require_scratch
sdev=$(_short_dev ${SCRATCH_DEV})
# Import common functions.
. ./common/filter
-_supported_fs ext4
+_exclude_fs ext2
+_exclude_fs ext3
_require_scratch
_require_command "$DEBUGFS_PROG" debugfs
. ./common/preamble
_begin_fstest auto rw quick
-_supported_fs ext4
+_exclude_fs ext2
+_exclude_fs ext3
_require_scratch
_require_scratch_shutdown
_require_command "$TUNE2FS_PROG" tune2fs
# Modify as appropriate.
-_supported_fs ext4
+_exclude_fs ext2
+_exclude_fs ext3
_require_test
_require_loop
_require_test_program "dirstress"
SIZE=$((1024 * 1024)) # 1GB in KB
LOGSIZE=$((10 *1024)) # 10MB in KB
-_supported_fs ext2 ext3 ext4
_require_scratch_size $SIZE
_require_quota
_require_loop
# Import common functions
. ./common/filter
-_supported_fs ext4
+_exclude_fs ext2
+_exclude_fs ext3
+
_require_scratch_nocheck
_require_xfs_io_command "falloc"
_require_xfs_io_command "pwrite"
. ./common/preamble
_begin_fstest auto quota
+_exclude_fs ext2
+_exclude_fs ext3
+
_require_scratch_nocheck
-_supported_fs ext4
_require_user fsgqa
_require_user fsgqa2
_require_command "$DEBUGFS_PROG" debugfs
STOP_ITER=255 # Arbitrary return code
-_supported_fs ext4
+_exclude_fs ext2
+_exclude_fs ext3
+
_require_scratch_size $(($RESIZED_FS_SIZE/1024))
_require_test_program "ext4_resize"
# Import common functions.
. ./common/filter
-_supported_fs ext4
+_exclude_fs ext2
+_exclude_fs ext3
+
_require_scratch
_require_test_program uuid_ioctl
_require_command $UUIDGEN_PROG uuidgen
. ./common/preamble
_begin_fstest auto quick
-_supported_fs ext4
+_exclude_fs ext2
+_exclude_fs ext3
+
_fixed_by_kernel_commit a08f789d2ab5 \
"ext4: fix bug_on ext4_mb_use_inode_pa"
_require_scratch
. ./common/preamble
_begin_fstest auto resize quick
-_supported_fs ext4
+_exclude_fs ext2
+_exclude_fs ext3
+
_fixed_by_kernel_commit b55c3cd102a6 \
"ext4: add reserved GDT blocks check"
. ./common/preamble
_begin_fstest auto resize quick
-_supported_fs ext4
+_exclude_fs ext2
+_exclude_fs ext3
+
_fixed_by_kernel_commit a6b3bfe176e8 \
"ext4: fix corruption during on-line resize"
# Import common functions.
. ./common/filter
-_supported_fs ext4
+_exclude_fs ext2
+_exclude_fs ext3
+
_require_scratch
# this test needs no journal to be loaded, skip on journal related mount
# options, otherwise mount would fail with "-o noload" mount option
. ./common/filter
. ./common/defrag
-_supported_fs ext4
+_exclude_fs ext2
+_exclude_fs ext3
+
_require_scratch
_require_defrag
_require_odirect
. ./common/filter
. ./common/defrag
-_supported_fs ext4
+_exclude_fs ext2
+_exclude_fs ext3
+
_require_scratch
_require_defrag
_require_odirect
. ./common/filter
. ./common/defrag
-_supported_fs ext4
+_exclude_fs ext2
+_exclude_fs ext3
+
_require_scratch
_require_defrag
_require_odirect
. ./common/filter
. ./common/defrag
-_supported_fs ext4
+_exclude_fs ext2
+_exclude_fs ext3
+
_require_scratch
_require_defrag
_require_odirect
# Import common functions.
. ./common/filter
-_supported_fs ext4
+_exclude_fs ext2
+_exclude_fs ext3
_require_scratch
# Import common functions.
. ./common/filter
-_supported_fs ext4
+_exclude_fs ext2
+_exclude_fs ext3
_require_scratch
_require_command "$RESIZE2FS_PROG" resize2fs
run_check md5sum -c $out.md5sum
}
-_supported_fs ext4
+_exclude_fs ext2
+_exclude_fs ext3
+
_require_scratch
_require_defrag
_require_xfs_io_command "falloc"
. ./common/filter
. ./common/reflink
+# btrfs can't fragment free space.
+_exclude_fs btrfs
+
+# This test is unreliable on NFS, as it depends on the exported filesystem.
+_exclude_fs nfs
-# btrfs can't fragment free space. This test is unreliable on NFS, as it
-# depends on the exported filesystem.
-_supported_fs ^btrfs ^nfs
_require_scratch_reflink
_require_cp_reflink
_require_xfs_io_command "falloc"
# NFS will optimize away the on-the-wire lookup before attempting to
# create a new file (since that means an extra round trip).
-_supported_fs ^nfs
+_exclude_fs nfs
_require_scratch
_require_symlinks
# For NFS, a reflink is just a CLONE operation, and after that
# point it's dealt with by the server.
-_supported_fs ^nfs
+_exclude_fs nfs
_require_scratch_swapfile
_require_scratch_reflink
_begin_fstest auto quick
# NFS forbade open with O_APPEND|O_DIRECT
-_supported_fs ^nfs
+_exclude_fs nfs
+
_require_test
_require_odirect
_require_test_program dio-append-buf-fault
# https://lore.kernel.org/linux-xfs/CAL3q7H7cURmnkJfUUx44HM3q=xKmqHb80eRdisErD_x8rU4+0Q@mail.gmail.com/
# https://lore.kernel.org/fstests/dca49a16a7aacdab831b8895bdecbbb52c0e609c.1733928765.git.fdmanana@suse.com/
#
-_supported_fs ^xfs
+_exclude_fs xfs
_require_scratch_swapfile
_require_scratch_reflink
# Import common functions.
. ./common/filter
-_supported_fs ^nfs
+_exclude_fs nfs
_require_aiodio aio-dio-append-write-read-race
_require_test_program "feature"
# and since we've filled the thinp device it'll return EIO, which will make
# btrfs flip read only, making it fail this test when it just won't work right
# for us in the first place.
-_supported_fs ^btrfs
+_exclude_fs btrfs
# Require underlying device support discard
_scratch_mkfs >>$seqres.full 2>&1
_require_scratch
_require_attrs trusted
-_supported_fs ^overlay
+
+_exclude_fs overlay
_require_extra_fs overlay
+
_fixed_by_kernel_commit 6da1b4b1ab36 \
"xfs: fix an ABBA deadlock in xfs_rename"
#
# https://lore.kernel.org/linux-btrfs/20220315164011.GF8241@magnolia/
#
-_supported_fs ^xfs
+_exclude_fs xfs
rm -f $seqres.full
rm -r -f $tmp.*
}
-_supported_fs ^overlay
+_exclude_fs overlay
_require_extra_fs overlay
+
_require_scratch
_require_chown
_require_idmapped_mounts
# This case give a assumption that the same mount options for
# different mount point will share the same superblock, which won't
# sucess for the follow fs.
-_supported_fs ^nfs ^overlay ^tmpfs
+_exclude_fs nfs
+_exclude_fs overlay
+_exclude_fs tmpfs
_require_test
_require_scratch
# a bunch of file systems don't support foreign fs detection
# ext* do support it, but disable the feature when called non-interactively
-_supported_fs ^ext2 ^ext3 ^ext4 ^jfs ^ocfs2 ^udf
+_exclude_fs ext2
+_exclude_fs ext3
+_exclude_fs ext4
+_exclude_fs jfs
+_exclude_fs ocfs2
+_exclude_fs udf
_require_block_device "${SCRATCH_DEV}"
# not all the FS support zoned block device