remove _supported_fs v2
Hi all,
this series removes the remaining _supported_fs calls and replaces them with a new _exclude_fs call.
The first patch removes a _supported_fs for a relatively new test from Brian that fails on other file systems. We should still run it so that people have a chance to fix the corruption, so I think this make sense.
Unlike the previous version this does not add a new ext-common directory, but instead uses _exclude_fs for those tests as well, which doesn't look quite as nice. Some of the ext4 maintainers said they might want to switch this to feature checks, which sounds great but also something better done by people familiar with extN.
Changes since v1:
- remove the separated ext-common directory previously added
PATCH 1/3 generic/363: remove _supported_fs xfs
Run this test for all file systems. Just because they are broken doesn't mean that zeroing should not be tested.
--- tests/generic/363 | 3 --- 1 file changed, 3 deletions(-)
tests/generic/363 +0 -3
@@ -13,9 +13,6 @@ _begin_fstest rw auto _require_test -# currently only xfs performs enough zeroing to satisfy fsx -_supported_fs xfs - # on failure, replace -q with -d to see post-eof writes in the dump output run_fsx "-q -S 0 -e 1 -N 100000"
Signature · 1 line
2.45.2
Re: [PATCH 1/3] generic/363: remove _supported_fs xfs
Quoted 5 lines · Christoph Hellwig
Run this test for all file systems. Just because they are broken doesn't mean that zeroing should not be tested.
Signed-off-by Christoph Hellwig <[email protected]>Reviewed-by Brian Foster <[email protected]>
/me notes that this fails on btrfs, though it seems ext4 is ok.....
--D
Quoted 22 lines
--- tests/generic/363 | 3 --- 1 file changed, 3 deletions(-)tests/generic/363 +0
-3@@ -13,9 +13,6 @@ _begin_fstest rw auto _require_test -# currently only xfs performs enough zeroing to satisfy fsx -_supported_fs xfs - # on failure, replace -q with -d to see post-eof writes in the dump output run_fsx "-q -S 0 -e 1 -N 100000"Signature · 1 line
2.45.2
Re: [PATCH 1/3] generic/363: remove _supported_fs xfs
Quoted 8 lines · Darrick J. Wong
Quoted 5 lines · Christoph Hellwig
Run this test for all file systems. Just because they are broken doesn't mean that zeroing should not be tested.
Signed-off-by Christoph Hellwig <[email protected]>Reviewed-by Brian Foster <[email protected]>/me notes that this fails on btrfs, though it seems ext4 is ok.....
Well, we should not skip tests because they fail, the point is to show something is broken..
PATCH 2/3 common: remove the $FSYP check in _cleanup_dump
In reply to Christoph HellwigDespite the comment, _cleanup_dump is only called from xfs specific tests, so this is superfluous.
--- common/dump | 6 ------ 1 file changed, 6 deletions(-)
common/dump +0 -6
@@ -223,12 +223,6 @@ _require_tape() # _cleanup_dump() { - # Some tests include this before checking _supported_fs xfs - # and the sleeps & checks here get annoying - if [ "$FSTYP" != "xfs" ]; then - return - fi - cd $here if [ -n "$DEBUGDUMP" ]; then
Signature · 1 line
2.45.2
Re: [PATCH 2/3] common: remove the $FSYP check in _cleanup_dump
Quoted 4 lines · Christoph Hellwig
Despite the comment,
_cleanup_dumpis only called from xfs specific tests, so this is superfluous.Signed-off-by Christoph Hellwig <[email protected]>
This patch looks ok, but I have a few extra[neous] comments...
Quoted 9 lines
--- common/dump | 6 ------ 1 file changed, 6 deletions(-)common/dump +0
-0
common/dump _require_tape() · line 231
Quoted 9 lines
common/dump +0
-6@@ -223,12 +223,6 @@ _require_tape() # _cleanup_dump() { - # Some tests include this before checking _supported_fs xfs - # and the sleeps & checks here get annoying - if [ "$FSTYP" != "xfs" ]; then - return - fi -
I went looking in common/dump and I noticed the lack of an explicit setup routine. Instead, variables and _require calls are done when sourcing the file. Curiously there's no check for FSTYP==xfs, which I guess is reasonable for sourced stuff, but I think that should all get pulled up into _init_dump() or something.
The other thing I noticed is that sourcing common/dump deletes $seqres.full, which seems like a real bug.
--D
Quoted 7 lines
common/dump +0
-0cd $here if [ -n "$DEBUGDUMP" ]; thenSignature · 1 line
2.45.2
Re: [PATCH 2/3] common: remove the $FSYP check in _cleanup_dump
Quoted 8 lines · Darrick J. Wong
I went looking in common/dump and I noticed the lack of an explicit setup routine. Instead, variables and
_requirecalls are done when sourcing the file. Curiously there's no check for FSTYP==xfs, which I guess is reasonable for sourced stuff, but I think that should all get pulled up into_init_dump()or something.The other thing I noticed is that sourcing common/dump deletes $seqres.full, which seems like a real bug.
Yeah, dump testing is at least as messy as xfsdump itself :)
Btw, did someone every spend some time analyzing why xfs/059 xfs/060 fail relatively frequently when using RT devices? This is one of the thing on my TODO list when I find a little more time..
PATCH 3/3 replace _supported_fs with _exclude_fs
In reply to Christoph HellwigTests don't require a list of supported file systems, as that is deducted from the test directory name. Instead we exclude specific file systems from a few common tests, and specify which of ext2 and ext3 should actually also be tested after oddly multiplexing them into the ext4 directory full of tests only working for ext4.
Replace _supported_fs with a new _exclude_fs that takes only a single file systems as the argument, making it easier to explain why the file system is not supported for the common test. For ext4 this increases the existing mess even further, but the maintainers have a plan to move it to feature checks instead that are hopefully easier to understand.
--- common/rc | 30 ++++++++---------------------- tests/ext4/001 | 4 +++- tests/ext4/002 | 2 +- tests/ext4/003 | 3 ++- tests/ext4/004 | 3 ++- tests/ext4/005 | 4 +++- tests/ext4/006 | 3 ++- tests/ext4/007 | 3 ++- tests/ext4/008 | 3 ++- tests/ext4/009 | 3 ++- tests/ext4/010 | 3 ++- tests/ext4/011 | 3 ++- tests/ext4/012 | 3 ++- tests/ext4/013 | 3 ++- tests/ext4/014 | 3 ++- tests/ext4/015 | 3 ++- tests/ext4/016 | 3 ++- tests/ext4/017 | 3 ++- tests/ext4/018 | 3 ++- tests/ext4/019 | 3 ++- tests/ext4/020 | 4 +++- tests/ext4/021 | 4 +++- tests/ext4/022 | 4 +++- tests/ext4/023 | 4 +++- tests/ext4/024 | 4 +++- tests/ext4/025 | 4 +++- tests/ext4/026 | 4 +++- tests/ext4/027 | 4 +++- tests/ext4/028 | 4 +++- tests/ext4/029 | 4 +++- tests/ext4/030 | 4 +++- tests/ext4/031 | 4 +++- tests/ext4/032 | 3 ++- tests/ext4/033 | 4 +++- tests/ext4/034 | 3 ++- tests/ext4/035 | 3 ++- tests/ext4/036 | 3 ++- tests/ext4/037 | 2 +- tests/ext4/038 | 3 +-- tests/ext4/039 | 3 ++- tests/ext4/040 | 1 - tests/ext4/041 | 1 - tests/ext4/042 | 3 --- tests/ext4/043 | 2 +- tests/ext4/044 | 4 +++- tests/ext4/045 | 3 ++- tests/ext4/046 | 3 ++- tests/ext4/047 | 4 +++- tests/ext4/048 | 3 ++- tests/ext4/049 | 3 ++- tests/ext4/050 | 3 ++- tests/ext4/051 | 3 ++- tests/ext4/052 | 3 ++- tests/ext4/053 | 1 - tests/ext4/054 | 4 +++- tests/ext4/055 | 4 +++- tests/ext4/056 | 4 +++- tests/ext4/057 | 4 +++- tests/ext4/058 | 4 +++- tests/ext4/059 | 4 +++- tests/ext4/060 | 4 +++- tests/ext4/271 | 4 +++- tests/ext4/301 | 4 +++- tests/ext4/302 | 4 +++- tests/ext4/303 | 4 +++- tests/ext4/304 | 4 +++- tests/ext4/305 | 3 ++- tests/ext4/306 | 3 ++- tests/ext4/307 | 4 +++- tests/generic/187 | 8 +++++--- tests/generic/294 | 2 +- tests/generic/357 | 2 +- tests/generic/362 | 3 ++- tests/generic/465 | 2 +- tests/generic/500 | 2 +- tests/generic/631 | 4 +++- tests/generic/679 | 2 +- tests/generic/699 | 3 ++- tests/generic/732 | 4 +++- tests/generic/740 | 7 ++++++- 80 files changed, 188 insertions(+), 106 deletions(-)
common/rc +8 -22
@@ -1769,30 +1769,16 @@ _fail() 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" }
tests/ext4/001 +3 -1
@@ -14,7 +14,9 @@ _begin_fstest auto prealloc quick zero fiemap . ./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
tests/ext4/002 +1 -1
@@ -29,7 +29,7 @@ _cleanup() # Import common functions. . ./common/filter -_supported_fs ext4 ext3 +_exclude_fs ext2 _require_scratch_nocheck _require_scratch_shutdown
tests/ext4/003 +2 -1
@@ -20,7 +20,8 @@ _cleanup() # Import common functions. . ./common/filter -_supported_fs ext4 +_exclude_fs ext2 +_exclude_fs ext3 _require_scratch _require_scratch_ext4_feature "bigalloc"
tests/ext4/004 +2 -1
@@ -43,7 +43,8 @@ workout() rm -rf restoresymtable } -_supported_fs ext4 +_exclude_fs ext2 +_exclude_fs ext3 _require_test _require_scratch
tests/ext4/005 +3 -1
@@ -17,7 +17,9 @@ _begin_fstest auto quick metadata ioctl rw # Import common functions. . ./common/filter -_supported_fs ext4 +_exclude_fs ext2 +_exclude_fs ext3 + _require_scratch _require_command "$CHATTR_PROG" chattr
tests/ext4/006 +2 -1
@@ -28,7 +28,8 @@ if [ ! -x "$(type -P e2fuzz)" ]; then _notrun "Couldn't find e2fuzz" fi -_supported_fs ext4 +_exclude_fs ext2 +_exclude_fs ext3 _require_scratch _require_attrs
tests/ext4/007 +2 -1
@@ -21,7 +21,8 @@ _cleanup() . ./common/filter . ./common/attr -_supported_fs ext4 +_exclude_fs ext2 +_exclude_fs ext3 _require_scratch test -n "${FORCE_FUZZ}" || _require_scratch_ext4_crc
tests/ext4/008 +2 -1
@@ -21,7 +21,8 @@ _cleanup() . ./common/filter . ./common/attr -_supported_fs ext4 +_exclude_fs ext2 +_exclude_fs ext3 _require_scratch test -n "${FORCE_FUZZ}" || _require_scratch_ext4_crc
tests/ext4/009 +2 -1
@@ -21,7 +21,8 @@ _cleanup() . ./common/filter . ./common/attr -_supported_fs ext4 +_exclude_fs ext2 +_exclude_fs ext3 _require_xfs_io_command "falloc" _require_scratch
tests/ext4/010 +2 -1
@@ -21,7 +21,8 @@ _cleanup() . ./common/filter . ./common/attr -_supported_fs ext4 +_exclude_fs ext2 +_exclude_fs ext3 _require_scratch _require_dumpe2fs
tests/ext4/011 +2 -1
@@ -21,7 +21,8 @@ _cleanup() . ./common/filter . ./common/attr -_supported_fs ext4 +_exclude_fs ext2 +_exclude_fs ext3 _require_scratch test -n "${FORCE_FUZZ}" || _require_scratch_ext4_crc
tests/ext4/012 +2 -1
@@ -21,7 +21,8 @@ _cleanup() . ./common/filter . ./common/attr -_supported_fs ext4 +_exclude_fs ext2 +_exclude_fs ext3 _require_scratch test -n "${FORCE_FUZZ}" || _require_scratch_ext4_crc
tests/ext4/013 +2 -1
@@ -21,7 +21,8 @@ _cleanup() . ./common/filter . ./common/attr -_supported_fs ext4 +_exclude_fs ext2 +_exclude_fs ext3 _require_scratch test -n "${FORCE_FUZZ}" || _require_scratch_ext4_crc
tests/ext4/014 +2 -1
@@ -21,7 +21,8 @@ _cleanup() . ./common/filter . ./common/attr -_supported_fs ext4 +_exclude_fs ext2 +_exclude_fs ext3 _require_scratch test -n "${FORCE_FUZZ}" || _require_scratch_ext4_crc
tests/ext4/015 +2 -1
@@ -21,7 +21,8 @@ _cleanup() . ./common/filter . ./common/attr -_supported_fs ext4 +_exclude_fs ext2 +_exclude_fs ext3 _require_xfs_io_command "falloc" _require_xfs_io_command "fpunch"
tests/ext4/016 +2 -1
@@ -21,7 +21,8 @@ _cleanup() . ./common/filter . ./common/attr -_supported_fs ext4 +_exclude_fs ext2 +_exclude_fs ext3 _require_scratch test -n "${FORCE_FUZZ}" || _require_scratch_ext4_crc
tests/ext4/017 +2 -1
@@ -21,7 +21,8 @@ _cleanup() . ./common/filter . ./common/attr -_supported_fs ext4 +_exclude_fs ext2 +_exclude_fs ext3 _require_scratch test -n "${FORCE_FUZZ}" || _require_scratch_ext4_crc
tests/ext4/018 +2 -1
@@ -21,7 +21,8 @@ _cleanup() . ./common/filter . ./common/attr -_supported_fs ext4 +_exclude_fs ext2 +_exclude_fs ext3 _require_scratch test -n "${FORCE_FUZZ}" || _require_scratch_ext4_crc
tests/ext4/019 +2 -1
@@ -21,7 +21,8 @@ _cleanup() . ./common/filter . ./common/attr -_supported_fs ext4 +_exclude_fs ext2 +_exclude_fs ext3 _require_scratch test -n "${FORCE_FUZZ}" || _require_scratch_ext4_crc
tests/ext4/020 +3 -1
@@ -17,7 +17,9 @@ _begin_fstest auto quick ioctl rw defrag . ./common/filter . ./common/defrag -_supported_fs ext4 +_exclude_fs ext2 +_exclude_fs ext3 + _require_scratch _require_defrag
tests/ext4/021 +3 -1
@@ -12,7 +12,9 @@ _begin_fstest auto quick # Import common functions. -_supported_fs ext4 +_exclude_fs ext2 +_exclude_fs ext3 + _require_scratch _require_dumpe2fs
tests/ext4/022 +3 -1
@@ -18,7 +18,9 @@ do_setfattr() . ./common/filter . ./common/attr -_supported_fs ext4 +_exclude_fs ext2 +_exclude_fs ext3 + _require_scratch _require_dumpe2fs _require_command "$DEBUGFS_PROG" debugfs
tests/ext4/023 +3 -1
@@ -18,7 +18,9 @@ _register_cleanup "_cleanup" BUS . ./common/populate . ./common/fuzzy -_supported_fs ext4 +_exclude_fs ext2 +_exclude_fs ext3 + _require_scratch echo "Format and populate"
tests/ext4/024 +3 -1
@@ -13,7 +13,9 @@ _begin_fstest auto quick encrypt dangerous # get standard environment and checks . ./common/encrypt -_supported_fs ext4 +_exclude_fs ext2 +_exclude_fs ext3 + _require_scratch_encryption _require_command "$KEYCTL_PROG" keyctl
tests/ext4/025 +3 -1
@@ -13,7 +13,9 @@ _begin_fstest auto quick fuzzers dangerous # 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"
tests/ext4/026 +3 -1
@@ -16,7 +16,9 @@ _begin_fstest auto quick attr . ./common/filter . ./common/attr -_supported_fs ext4 +_exclude_fs ext2 +_exclude_fs ext3 + _require_scratch _require_attrs _require_scratch_ext4_feature "ea_inode"
tests/ext4/027 +3 -1
@@ -19,7 +19,9 @@ _cleanup() # Import common functions. . ./common/filter -_supported_fs ext4 +_exclude_fs ext2 +_exclude_fs ext3 + _require_scratch _require_xfs_io_command "fsmap"
tests/ext4/028 +3 -1
@@ -20,7 +20,9 @@ _cleanup() . ./common/filter . ./common/populate -_supported_fs ext4 +_exclude_fs ext2 +_exclude_fs ext3 + _require_scratch _require_populate_commands _require_xfs_io_command "fsmap"
tests/ext4/029 +3 -1
@@ -19,7 +19,9 @@ _cleanup() # Import common functions. . ./common/filter -_supported_fs ext4 +_exclude_fs ext2 +_exclude_fs ext3 + _require_logdev _require_scratch _require_xfs_io_command "fsmap"
tests/ext4/030 +3 -1
@@ -15,7 +15,9 @@ _begin_fstest auto quick dax . ./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
tests/ext4/031 +3 -1
@@ -19,7 +19,9 @@ SAVE_MOUNT_OPTIONS="$MOUNT_OPTIONS" 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"
tests/ext4/032 +2 -1
@@ -83,7 +83,8 @@ _cleanup() # get standard environment and checks -_supported_fs ext4 +_exclude_fs ext2 +_exclude_fs ext3 _require_loop _require_scratch
tests/ext4/033 +3 -1
@@ -24,7 +24,9 @@ _cleanup() . ./common/filter . ./common/dmhugedisk -_supported_fs ext4 +_exclude_fs ext2 +_exclude_fs ext3 + _require_scratch_nocheck _require_dmhugedisk _require_dumpe2fs
tests/ext4/034 +2 -1
@@ -19,7 +19,8 @@ _begin_fstest auto quick quota fiemap prealloc # Modify as appropriate. -_supported_fs ext4 +_exclude_fs ext2 +_exclude_fs ext3 _require_scratch _require_quota _require_nobody
tests/ext4/035 +2 -1
@@ -19,7 +19,8 @@ _begin_fstest auto quick resize # 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
tests/ext4/036 +2 -1
@@ -15,7 +15,8 @@ _begin_fstest auto quick # Import common functions. . ./common/filter -_supported_fs ext3 ext4 +_exclude_fs ext2 + _require_scratch echo "Silence is golden"
tests/ext4/037 +1 -1
@@ -15,7 +15,7 @@ _begin_fstest auto quick # Import common functions. . ./common/filter -_supported_fs ext3 ext4 +_exclude_fs ext2 # nofsck as we modify sb via debugfs _require_scratch_nocheck
tests/ext4/038 +1 -2
@@ -10,9 +10,8 @@ . ./common/preamble _begin_fstest auto quick -# Import common functions. +_exclude_fs ext2 -_supported_fs ext3 ext4 _require_scratch _require_command "$DEBUGFS_PROG" debugfs
tests/ext4/039 +2 -1
@@ -56,7 +56,8 @@ chattr_opt: $chattr_opt" >>$seqres.full done } -_supported_fs ext3 ext4 +_exclude_fs ext2 + _require_scratch _exclude_scratch_mount_option dax
tests/ext4/040 +0 -1
@@ -21,7 +21,6 @@ PIDS="" # Import common functions. . ./common/filter -_supported_fs ext2 ext3 ext4 _require_scratch_nocheck _disable_dmesg_check _require_command "$DEBUGFS_PROG"
tests/ext4/041 +0 -1
@@ -21,7 +21,6 @@ PIDS="" # Import common functions. . ./common/filter -_supported_fs ext2 ext3 ext4 _require_scratch_nocheck _disable_dmesg_check _require_command "$DEBUGFS_PROG"
tests/ext4/042 +0 -3
@@ -12,9 +12,6 @@ _begin_fstest auto quick # Import common functions. . ./common/filter - -# Modify as appropriate. -_supported_fs ext2 ext3 ext4 _require_scratch _scratch_mkfs >> $seqres.full 2>&1
tests/ext4/043 +1 -1
@@ -12,7 +12,7 @@ _begin_fstest auto quick # Import common functions. . ./common/filter -_supported_fs ext3 ext4 +_exclude_fs ext2 _require_scratch _require_test_program "t_get_file_time"
tests/ext4/044 +3 -1
@@ -12,7 +12,9 @@ _begin_fstest auto quick # 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
tests/ext4/045 +2 -1
@@ -16,7 +16,8 @@ LONG_DIR=2 # Import common functions. . ./common/filter -_supported_fs ext4 +_exclude_fs ext2 +_exclude_fs ext3 _require_scratch _require_scratch_ext4_feature large_dir
tests/ext4/046 +2 -1
@@ -16,7 +16,8 @@ _begin_fstest auto prealloc quick . ./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
tests/ext4/047 +3 -1
@@ -13,7 +13,9 @@ _begin_fstest auto quick dax # 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"
tests/ext4/048 +2 -1
@@ -13,7 +13,8 @@ _begin_fstest auto quick dir # Import common functions. . ./common/filter -_supported_fs ext4 +_exclude_fs ext2 +_exclude_fs ext3 _require_scratch _require_command "$DEBUGFS_PROG" debugfs
tests/ext4/049 +2 -1
@@ -13,7 +13,8 @@ _begin_fstest auto quick # Import common functions. . ./common/filter -_supported_fs ext4 +_exclude_fs ext2 +_exclude_fs ext3 _require_scratch sdev=$(_short_dev ${SCRATCH_DEV})
tests/ext4/050 +2 -1
@@ -13,7 +13,8 @@ _begin_fstest auto ioctl quick # Import common functions. . ./common/filter -_supported_fs ext4 +_exclude_fs ext2 +_exclude_fs ext3 _require_scratch _require_command "$DEBUGFS_PROG" debugfs
tests/ext4/051 +2 -1
@@ -12,7 +12,8 @@ . ./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
tests/ext4/052 +2 -1
@@ -29,7 +29,8 @@ _cleanup() # Modify as appropriate. -_supported_fs ext4 +_exclude_fs ext2 +_exclude_fs ext3 _require_test _require_loop _require_test_program "dirstress"
tests/ext4/053 +0 -1
@@ -39,7 +39,6 @@ echo "Silence is golden." 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
tests/ext4/054 +3 -1
@@ -17,7 +17,9 @@ _begin_fstest auto quick dangerous_fuzzers prealloc punch # 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"
tests/ext4/055 +3 -1
@@ -16,8 +16,10 @@ . ./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
tests/ext4/056 +3 -1
@@ -26,7 +26,9 @@ ONLINE_RESIZE_BLOCK_LIMIT=$((256*1024*1024)) 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"
tests/ext4/057 +3 -1
@@ -11,7 +11,9 @@ _begin_fstest auto ioctl # 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
tests/ext4/058 +3 -1
@@ -13,7 +13,9 @@ . ./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
tests/ext4/059 +3 -1
@@ -11,7 +11,9 @@ . ./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"
tests/ext4/060 +3 -1
@@ -14,7 +14,9 @@ . ./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"
tests/ext4/271 +3 -1
@@ -12,7 +12,9 @@ _begin_fstest auto rw quick # 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
tests/ext4/301 +3 -1
@@ -15,7 +15,9 @@ fio_config=$tmp.fio . ./common/filter . ./common/defrag -_supported_fs ext4 +_exclude_fs ext2 +_exclude_fs ext3 + _require_scratch _require_defrag _require_odirect
tests/ext4/302 +3 -1
@@ -16,7 +16,9 @@ fio_config=$tmp.fio . ./common/filter . ./common/defrag -_supported_fs ext4 +_exclude_fs ext2 +_exclude_fs ext3 + _require_scratch _require_defrag _require_odirect
tests/ext4/303 +3 -1
@@ -16,7 +16,9 @@ fio_config=$tmp.fio . ./common/filter . ./common/defrag -_supported_fs ext4 +_exclude_fs ext2 +_exclude_fs ext3 + _require_scratch _require_defrag _require_odirect
tests/ext4/304 +3 -1
@@ -17,7 +17,9 @@ fio_config=$tmp.fio . ./common/filter . ./common/defrag -_supported_fs ext4 +_exclude_fs ext2 +_exclude_fs ext3 + _require_scratch _require_defrag _require_odirect
tests/ext4/305 +2 -1
@@ -22,7 +22,8 @@ _cleanup() # Import common functions. . ./common/filter -_supported_fs ext4 +_exclude_fs ext2 +_exclude_fs ext3 _require_scratch
tests/ext4/306 +2 -1
@@ -22,7 +22,8 @@ _cleanup() # Import common functions. . ./common/filter -_supported_fs ext4 +_exclude_fs ext2 +_exclude_fs ext3 _require_scratch _require_command "$RESIZE2FS_PROG" resize2fs
tests/ext4/307 +3 -1
@@ -34,7 +34,9 @@ _workout() run_check md5sum -c $out.md5sum } -_supported_fs ext4 +_exclude_fs ext2 +_exclude_fs ext3 + _require_scratch _require_defrag _require_xfs_io_command "falloc"
tests/generic/187 +5 -3
@@ -28,10 +28,12 @@ _cleanup() . ./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"
tests/generic/294 +1 -1
@@ -16,7 +16,7 @@ _begin_fstest auto quick # 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
tests/generic/357 +1 -1
@@ -26,7 +26,7 @@ _cleanup() # 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
tests/generic/362 +2 -1
@@ -11,7 +11,8 @@ _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
tests/generic/465 +1 -1
@@ -20,7 +20,7 @@ _cleanup() # Import common functions. . ./common/filter -_supported_fs ^nfs +_exclude_fs nfs _require_aiodio aio-dio-append-write-read-race _require_test_program "feature"
tests/generic/500 +1 -1
@@ -41,7 +41,7 @@ _require_dm_target thin-pool # 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
tests/generic/631 +3 -1
@@ -37,8 +37,10 @@ _cleanup() _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"
tests/generic/679 +1 -1
@@ -23,7 +23,7 @@ _require_xfs_io_command "fiemap" # # https://lore.kernel.org/linux-btrfs/20220315164011.GF8241@magnolia/ # -_supported_fs ^xfs +_exclude_fs xfs rm -f $seqres.full
tests/generic/699 +2 -1
@@ -21,8 +21,9 @@ _cleanup() rm -r -f $tmp.* } -_supported_fs ^overlay +_exclude_fs overlay _require_extra_fs overlay + _require_scratch _require_chown _require_idmapped_mounts
tests/generic/732 +3 -1
@@ -24,7 +24,9 @@ _cleanup() # 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
tests/generic/740 +6 -1
@@ -14,7 +14,12 @@ _begin_fstest mkfs auto quick # 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
Signature · 1 line
2.45.2
Re: [PATCH 3/3] replace _supported_fs with _exclude_fs
Quoted 6 lines · Christoph Hellwig
Tests don't require a list of supported file systems, as that is deducted from the test directory name. Instead we exclude specific file systems from a few common tests, and specify which of ext2 and ext3 should actually also be tested after oddly multiplexing them into the ext4 directory full of tests only working for ext4.
Quoted 6 lines
Replace
_supported_fswith a new_exclude_fsthat takes only a single file systems as the argument, making it easier to explain why the file system is not supported for the common test. For ext4 this increases the existing mess even further, but the maintainers have a plan to move it to feature checks instead that are hopefully easier to understand.
They do? FWIW the tests/ext4 conversions look reasonable as a mechanical change to me, but I /was/ wondering what they'd think of this change.
Quoted 1 line
Signed-off-by Christoph Hellwig <[email protected]>
That said I don't care to hold this up so
--D
Quoted 1,268 lines
--- common/rc | 30 ++++++++---------------------- tests/ext4/001 | 4 +++- tests/ext4/002 | 2 +- tests/ext4/003 | 3 ++- tests/ext4/004 | 3 ++- tests/ext4/005 | 4 +++- tests/ext4/006 | 3 ++- tests/ext4/007 | 3 ++- tests/ext4/008 | 3 ++- tests/ext4/009 | 3 ++- tests/ext4/010 | 3 ++- tests/ext4/011 | 3 ++- tests/ext4/012 | 3 ++- tests/ext4/013 | 3 ++- tests/ext4/014 | 3 ++- tests/ext4/015 | 3 ++- tests/ext4/016 | 3 ++- tests/ext4/017 | 3 ++- tests/ext4/018 | 3 ++- tests/ext4/019 | 3 ++- tests/ext4/020 | 4 +++- tests/ext4/021 | 4 +++- tests/ext4/022 | 4 +++- tests/ext4/023 | 4 +++- tests/ext4/024 | 4 +++- tests/ext4/025 | 4 +++- tests/ext4/026 | 4 +++- tests/ext4/027 | 4 +++- tests/ext4/028 | 4 +++- tests/ext4/029 | 4 +++- tests/ext4/030 | 4 +++- tests/ext4/031 | 4 +++- tests/ext4/032 | 3 ++- tests/ext4/033 | 4 +++- tests/ext4/034 | 3 ++- tests/ext4/035 | 3 ++- tests/ext4/036 | 3 ++- tests/ext4/037 | 2 +- tests/ext4/038 | 3 +-- tests/ext4/039 | 3 ++- tests/ext4/040 | 1 - tests/ext4/041 | 1 - tests/ext4/042 | 3 --- tests/ext4/043 | 2 +- tests/ext4/044 | 4 +++- tests/ext4/045 | 3 ++- tests/ext4/046 | 3 ++- tests/ext4/047 | 4 +++- tests/ext4/048 | 3 ++- tests/ext4/049 | 3 ++- tests/ext4/050 | 3 ++- tests/ext4/051 | 3 ++- tests/ext4/052 | 3 ++- tests/ext4/053 | 1 - tests/ext4/054 | 4 +++- tests/ext4/055 | 4 +++- tests/ext4/056 | 4 +++- tests/ext4/057 | 4 +++- tests/ext4/058 | 4 +++- tests/ext4/059 | 4 +++- tests/ext4/060 | 4 +++- tests/ext4/271 | 4 +++- tests/ext4/301 | 4 +++- tests/ext4/302 | 4 +++- tests/ext4/303 | 4 +++- tests/ext4/304 | 4 +++- tests/ext4/305 | 3 ++- tests/ext4/306 | 3 ++- tests/ext4/307 | 4 +++- tests/generic/187 | 8 +++++--- tests/generic/294 | 2 +- tests/generic/357 | 2 +- tests/generic/362 | 3 ++- tests/generic/465 | 2 +- tests/generic/500 | 2 +- tests/generic/631 | 4 +++- tests/generic/679 | 2 +- tests/generic/699 | 3 ++- tests/generic/732 | 4 +++- tests/generic/740 | 7 ++++++- 80 files changed, 188 insertions(+), 106 deletions(-)common/rc +8
-22@@ -1769,30 +1769,16 @@ _fail() 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" }tests/ext4/001 +3
-1@@ -14,7 +14,9 @@ _begin_fstest auto prealloc quick zero fiemap . ./common/filter . ./common/punch -_supported_fs ext4 +_exclude_fs ext2 +_exclude_fs ext3 + _require_xfs_io_command "falloc" _require_xfs_io_command "fzero" _require_testtests/ext4/002 +1
-1@@ -29,7 +29,7 @@ _cleanup() # Import common functions. . ./common/filter -_supported_fs ext4 ext3 +_exclude_fs ext2 _require_scratch_nocheck _require_scratch_shutdowntests/ext4/003 +2
-1@@ -20,7 +20,8 @@ _cleanup() # Import common functions. . ./common/filter -_supported_fs ext4 +_exclude_fs ext2 +_exclude_fs ext3 _require_scratch _require_scratch_ext4_feature "bigalloc"tests/ext4/004 +2
-1@@ -43,7 +43,8 @@ workout() rm -rf restoresymtable } -_supported_fs ext4 +_exclude_fs ext2 +_exclude_fs ext3 _require_test _require_scratchtests/ext4/005 +3
-1@@ -17,7 +17,9 @@ _begin_fstest auto quick metadata ioctl rw # Import common functions. . ./common/filter -_supported_fs ext4 +_exclude_fs ext2 +_exclude_fs ext3 + _require_scratch _require_command "$CHATTR_PROG" chattrtests/ext4/006 +2
-1@@ -28,7 +28,8 @@ if [ ! -x "$(type -P e2fuzz)" ]; then _notrun "Couldn't find e2fuzz" fi -_supported_fs ext4 +_exclude_fs ext2 +_exclude_fs ext3 _require_scratch _require_attrstests/ext4/007 +2
-1@@ -21,7 +21,8 @@ _cleanup() . ./common/filter . ./common/attr -_supported_fs ext4 +_exclude_fs ext2 +_exclude_fs ext3 _require_scratch test -n "${FORCE_FUZZ}" || _require_scratch_ext4_crctests/ext4/008 +2
-1@@ -21,7 +21,8 @@ _cleanup() . ./common/filter . ./common/attr -_supported_fs ext4 +_exclude_fs ext2 +_exclude_fs ext3 _require_scratch test -n "${FORCE_FUZZ}" || _require_scratch_ext4_crctests/ext4/009 +2
-1@@ -21,7 +21,8 @@ _cleanup() . ./common/filter . ./common/attr -_supported_fs ext4 +_exclude_fs ext2 +_exclude_fs ext3 _require_xfs_io_command "falloc" _require_scratchtests/ext4/010 +2
-1@@ -21,7 +21,8 @@ _cleanup() . ./common/filter . ./common/attr -_supported_fs ext4 +_exclude_fs ext2 +_exclude_fs ext3 _require_scratch _require_dumpe2fstests/ext4/011 +2
-1@@ -21,7 +21,8 @@ _cleanup() . ./common/filter . ./common/attr -_supported_fs ext4 +_exclude_fs ext2 +_exclude_fs ext3 _require_scratch test -n "${FORCE_FUZZ}" || _require_scratch_ext4_crctests/ext4/012 +2
-1@@ -21,7 +21,8 @@ _cleanup() . ./common/filter . ./common/attr -_supported_fs ext4 +_exclude_fs ext2 +_exclude_fs ext3 _require_scratch test -n "${FORCE_FUZZ}" || _require_scratch_ext4_crctests/ext4/013 +2
-1@@ -21,7 +21,8 @@ _cleanup() . ./common/filter . ./common/attr -_supported_fs ext4 +_exclude_fs ext2 +_exclude_fs ext3 _require_scratch test -n "${FORCE_FUZZ}" || _require_scratch_ext4_crctests/ext4/014 +2
-1@@ -21,7 +21,8 @@ _cleanup() . ./common/filter . ./common/attr -_supported_fs ext4 +_exclude_fs ext2 +_exclude_fs ext3 _require_scratch test -n "${FORCE_FUZZ}" || _require_scratch_ext4_crctests/ext4/015 +2
-1@@ -21,7 +21,8 @@ _cleanup() . ./common/filter . ./common/attr -_supported_fs ext4 +_exclude_fs ext2 +_exclude_fs ext3 _require_xfs_io_command "falloc" _require_xfs_io_command "fpunch"tests/ext4/016 +2
-1@@ -21,7 +21,8 @@ _cleanup() . ./common/filter . ./common/attr -_supported_fs ext4 +_exclude_fs ext2 +_exclude_fs ext3 _require_scratch test -n "${FORCE_FUZZ}" || _require_scratch_ext4_crctests/ext4/017 +2
-1@@ -21,7 +21,8 @@ _cleanup() . ./common/filter . ./common/attr -_supported_fs ext4 +_exclude_fs ext2 +_exclude_fs ext3 _require_scratch test -n "${FORCE_FUZZ}" || _require_scratch_ext4_crctests/ext4/018 +2
-1@@ -21,7 +21,8 @@ _cleanup() . ./common/filter . ./common/attr -_supported_fs ext4 +_exclude_fs ext2 +_exclude_fs ext3 _require_scratch test -n "${FORCE_FUZZ}" || _require_scratch_ext4_crctests/ext4/019 +2
-1@@ -21,7 +21,8 @@ _cleanup() . ./common/filter . ./common/attr -_supported_fs ext4 +_exclude_fs ext2 +_exclude_fs ext3 _require_scratch test -n "${FORCE_FUZZ}" || _require_scratch_ext4_crctests/ext4/020 +3
-1@@ -17,7 +17,9 @@ _begin_fstest auto quick ioctl rw defrag . ./common/filter . ./common/defrag -_supported_fs ext4 +_exclude_fs ext2 +_exclude_fs ext3 + _require_scratch _require_defragtests/ext4/021 +3
-1@@ -12,7 +12,9 @@ _begin_fstest auto quick # Import common functions. -_supported_fs ext4 +_exclude_fs ext2 +_exclude_fs ext3 + _require_scratch _require_dumpe2fstests/ext4/022 +3
-1@@ -18,7 +18,9 @@ do_setfattr() . ./common/filter . ./common/attr -_supported_fs ext4 +_exclude_fs ext2 +_exclude_fs ext3 + _require_scratch _require_dumpe2fs _require_command "$DEBUGFS_PROG" debugfstests/ext4/023 +3
-1@@ -18,7 +18,9 @@ _register_cleanup "_cleanup" BUS . ./common/populate . ./common/fuzzy -_supported_fs ext4 +_exclude_fs ext2 +_exclude_fs ext3 + _require_scratch echo "Format and populate"tests/ext4/024 +3
-1@@ -13,7 +13,9 @@ _begin_fstest auto quick encrypt dangerous # get standard environment and checks . ./common/encrypt -_supported_fs ext4 +_exclude_fs ext2 +_exclude_fs ext3 + _require_scratch_encryption _require_command "$KEYCTL_PROG" keyctltests/ext4/025 +3
-1@@ -13,7 +13,9 @@ _begin_fstest auto quick fuzzers dangerous # 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"tests/ext4/026 +3
-1@@ -16,7 +16,9 @@ _begin_fstest auto quick attr . ./common/filter . ./common/attr -_supported_fs ext4 +_exclude_fs ext2 +_exclude_fs ext3 + _require_scratch _require_attrs _require_scratch_ext4_feature "ea_inode"tests/ext4/027 +3
-1@@ -19,7 +19,9 @@ _cleanup() # Import common functions. . ./common/filter -_supported_fs ext4 +_exclude_fs ext2 +_exclude_fs ext3 + _require_scratch _require_xfs_io_command "fsmap"tests/ext4/028 +3
-1@@ -20,7 +20,9 @@ _cleanup() . ./common/filter . ./common/populate -_supported_fs ext4 +_exclude_fs ext2 +_exclude_fs ext3 + _require_scratch _require_populate_commands _require_xfs_io_command "fsmap"tests/ext4/029 +3
-1@@ -19,7 +19,9 @@ _cleanup() # Import common functions. . ./common/filter -_supported_fs ext4 +_exclude_fs ext2 +_exclude_fs ext3 + _require_logdev _require_scratch _require_xfs_io_command "fsmap"tests/ext4/030 +3
-1@@ -15,7 +15,9 @@ _begin_fstest auto quick dax . ./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" chattrtests/ext4/031 +3
-1@@ -19,7 +19,9 @@ SAVE_MOUNT_OPTIONS="$MOUNT_OPTIONS" 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"tests/ext4/032 +2
-1@@ -83,7 +83,8 @@ _cleanup() # get standard environment and checks -_supported_fs ext4 +_exclude_fs ext2 +_exclude_fs ext3 _require_loop _require_scratchtests/ext4/033 +3
-1@@ -24,7 +24,9 @@ _cleanup() . ./common/filter . ./common/dmhugedisk -_supported_fs ext4 +_exclude_fs ext2 +_exclude_fs ext3 + _require_scratch_nocheck _require_dmhugedisk _require_dumpe2fstests/ext4/034 +2
-1@@ -19,7 +19,8 @@ _begin_fstest auto quick quota fiemap prealloc # Modify as appropriate. -_supported_fs ext4 +_exclude_fs ext2 +_exclude_fs ext3 _require_scratch _require_quota _require_nobodytests/ext4/035 +2
-1@@ -19,7 +19,8 @@ _begin_fstest auto quick resize # 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" resize2fstests/ext4/036 +2
-1@@ -15,7 +15,8 @@ _begin_fstest auto quick # Import common functions. . ./common/filter -_supported_fs ext3 ext4 +_exclude_fs ext2 + _require_scratch echo "Silence is golden"tests/ext4/037 +1
-1@@ -15,7 +15,7 @@ _begin_fstest auto quick # Import common functions. . ./common/filter -_supported_fs ext3 ext4 +_exclude_fs ext2 # nofsck as we modify sb via debugfs _require_scratch_nochecktests/ext4/038 +1
-2@@ -10,9 +10,8 @@ . ./common/preamble _begin_fstest auto quick -# Import common functions. +_exclude_fs ext2 -_supported_fs ext3 ext4 _require_scratch _require_command "$DEBUGFS_PROG" debugfstests/ext4/039 +2
-1@@ -56,7 +56,8 @@ chattr_opt: $chattr_opt" >>$seqres.full done } -_supported_fs ext3 ext4 +_exclude_fs ext2 + _require_scratch _exclude_scratch_mount_option daxtests/ext4/040 +0
-1@@ -21,7 +21,6 @@ PIDS="" # Import common functions. . ./common/filter -_supported_fs ext2 ext3 ext4 _require_scratch_nocheck _disable_dmesg_check _require_command "$DEBUGFS_PROG"tests/ext4/041 +0
-1@@ -21,7 +21,6 @@ PIDS="" # Import common functions. . ./common/filter -_supported_fs ext2 ext3 ext4 _require_scratch_nocheck _disable_dmesg_check _require_command "$DEBUGFS_PROG"tests/ext4/042 +0
-3@@ -12,9 +12,6 @@ _begin_fstest auto quick # Import common functions. . ./common/filter - -# Modify as appropriate. -_supported_fs ext2 ext3 ext4 _require_scratch _scratch_mkfs >> $seqres.full 2>&1tests/ext4/043 +1
-1@@ -12,7 +12,7 @@ _begin_fstest auto quick # Import common functions. . ./common/filter -_supported_fs ext3 ext4 +_exclude_fs ext2 _require_scratch _require_test_program "t_get_file_time"tests/ext4/044 +3
-1@@ -12,7 +12,9 @@ _begin_fstest auto quick # 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_journalingtests/ext4/045 +2
-1@@ -16,7 +16,8 @@ LONG_DIR=2 # Import common functions. . ./common/filter -_supported_fs ext4 +_exclude_fs ext2 +_exclude_fs ext3 _require_scratch _require_scratch_ext4_feature large_dirtests/ext4/046 +2
-1@@ -16,7 +16,8 @@ _begin_fstest auto prealloc quick . ./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)) #kBtests/ext4/047 +3
-1@@ -13,7 +13,9 @@ _begin_fstest auto quick dax # 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"tests/ext4/048 +2
-1@@ -13,7 +13,8 @@ _begin_fstest auto quick dir # Import common functions. . ./common/filter -_supported_fs ext4 +_exclude_fs ext2 +_exclude_fs ext3 _require_scratch _require_command "$DEBUGFS_PROG" debugfstests/ext4/049 +2
-1@@ -13,7 +13,8 @@ _begin_fstest auto quick # Import common functions. . ./common/filter -_supported_fs ext4 +_exclude_fs ext2 +_exclude_fs ext3 _require_scratch sdev=$(_short_dev ${SCRATCH_DEV})tests/ext4/050 +2
-1@@ -13,7 +13,8 @@ _begin_fstest auto ioctl quick # Import common functions. . ./common/filter -_supported_fs ext4 +_exclude_fs ext2 +_exclude_fs ext3 _require_scratch _require_command "$DEBUGFS_PROG" debugfstests/ext4/051 +2
-1@@ -12,7 +12,8 @@ . ./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" tune2fstests/ext4/052 +2
-1@@ -29,7 +29,8 @@ _cleanup() # Modify as appropriate. -_supported_fs ext4 +_exclude_fs ext2 +_exclude_fs ext3 _require_test _require_loop _require_test_program "dirstress"tests/ext4/053 +0
-1@@ -39,7 +39,6 @@ echo "Silence is golden." SIZE=$((1024 * 1024)) # 1GB in KB LOGSIZE=$((10 *1024)) # 10MB in KB -_supported_fs ext2 ext3 ext4 _require_scratch_size $SIZE _require_quota _require_looptests/ext4/054 +3
-1@@ -17,7 +17,9 @@ _begin_fstest auto quick dangerous_fuzzers prealloc punch # 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"tests/ext4/055 +3
-1@@ -16,8 +16,10 @@ . ./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" debugfstests/ext4/056 +3
-1@@ -26,7 +26,9 @@ ONLINE_RESIZE_BLOCK_LIMIT=$((256*1024*1024)) 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"tests/ext4/057 +3
-1@@ -11,7 +11,9 @@ _begin_fstest auto ioctl # 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 uuidgentests/ext4/058 +3
-1@@ -13,7 +13,9 @@ . ./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_scratchtests/ext4/059 +3
-1@@ -11,7 +11,9 @@ . ./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"tests/ext4/060 +3
-1@@ -14,7 +14,9 @@ . ./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"tests/ext4/271 +3
-1@@ -12,7 +12,9 @@ _begin_fstest auto rw quick # 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 optiontests/ext4/301 +3
-1@@ -15,7 +15,9 @@ fio_config=$tmp.fio . ./common/filter . ./common/defrag -_supported_fs ext4 +_exclude_fs ext2 +_exclude_fs ext3 + _require_scratch _require_defrag _require_odirecttests/ext4/302 +3
-1@@ -16,7 +16,9 @@ fio_config=$tmp.fio . ./common/filter . ./common/defrag -_supported_fs ext4 +_exclude_fs ext2 +_exclude_fs ext3 + _require_scratch _require_defrag _require_odirecttests/ext4/303 +3
-1@@ -16,7 +16,9 @@ fio_config=$tmp.fio . ./common/filter . ./common/defrag -_supported_fs ext4 +_exclude_fs ext2 +_exclude_fs ext3 + _require_scratch _require_defrag _require_odirecttests/ext4/304 +3
-1@@ -17,7 +17,9 @@ fio_config=$tmp.fio . ./common/filter . ./common/defrag -_supported_fs ext4 +_exclude_fs ext2 +_exclude_fs ext3 + _require_scratch _require_defrag _require_odirecttests/ext4/305 +2
-1@@ -22,7 +22,8 @@ _cleanup() # Import common functions. . ./common/filter -_supported_fs ext4 +_exclude_fs ext2 +_exclude_fs ext3 _require_scratchtests/ext4/306 +2
-1@@ -22,7 +22,8 @@ _cleanup() # Import common functions. . ./common/filter -_supported_fs ext4 +_exclude_fs ext2 +_exclude_fs ext3 _require_scratch _require_command "$RESIZE2FS_PROG" resize2fstests/ext4/307 +3
-1@@ -34,7 +34,9 @@ _workout() run_check md5sum -c $out.md5sum } -_supported_fs ext4 +_exclude_fs ext2 +_exclude_fs ext3 + _require_scratch _require_defrag _require_xfs_io_command "falloc"tests/generic/187 +5
-3@@ -28,10 +28,12 @@ _cleanup() . ./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"tests/generic/294 +1
-1@@ -16,7 +16,7 @@ _begin_fstest auto quick # 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_symlinkstests/generic/357 +1
-1@@ -26,7 +26,7 @@ _cleanup() # 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_reflinktests/generic/362 +2
-1@@ -11,7 +11,8 @@ _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-faulttests/generic/465 +1
-1@@ -20,7 +20,7 @@ _cleanup() # Import common functions. . ./common/filter -_supported_fs ^nfs +_exclude_fs nfs _require_aiodio aio-dio-append-write-read-race _require_test_program "feature"tests/generic/500 +1
-1@@ -41,7 +41,7 @@ _require_dm_target thin-pool # 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>&1tests/generic/631 +3
-1@@ -37,8 +37,10 @@ _cleanup() _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"tests/generic/679 +1
-1@@ -23,7 +23,7 @@ _require_xfs_io_command "fiemap" # # https://lore.kernel.org/linux-btrfs/20220315164011.GF8241@magnolia/ # -_supported_fs ^xfs +_exclude_fs xfs rm -f $seqres.fulltests/generic/699 +2
-1@@ -21,8 +21,9 @@ _cleanup() rm -r -f $tmp.* } -_supported_fs ^overlay +_exclude_fs overlay _require_extra_fs overlay + _require_scratch _require_chown _require_idmapped_mountstests/generic/732 +3
-1@@ -24,7 +24,9 @@ _cleanup() # 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_scratchtests/generic/740 +6
-1@@ -14,7 +14,12 @@ _begin_fstest mkfs auto quick # 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 deviceSignature · 1 line
2.45.2
Re: [PATCH 3/3] replace _supported_fs with _exclude_fs
Quoted 8 lines · Darrick J. Wong
Quoted 4 lines
system is not supported for the common test. For ext4 this increases the existing mess even further, but the maintainers have a plan to move it to feature checks instead that are hopefully easier to understand.
They do? FWIW the tests/ext4 conversions look reasonable as a mechanical change to me, but I /was/ wondering what they'd think of this change.
Ted mentioned that's the preferred way in reply to v1 after he apparently brought this up on some ext4 call. I personally still think abusing the ext4 dir for ext2/3 is stupid, but I don't care strongly enough to fight.
Re: [PATCH 3/3] replace _supported_fs with _exclude_fs
In reply to Christoph HellwigQuoted 13 lines · Christoph Hellwig
Tests don't require a list of supported file systems, as that is deducted from the test directory name. Instead we exclude specific file systems from a few common tests, and specify which of ext2 and ext3 should actually also be tested after oddly multiplexing them into the ext4 directory full of tests only working for ext4.
Replace
_supported_fswith a new_exclude_fsthat takes only a single file systems as the argument, making it easier to explain why the file system is not supported for the common test. For ext4 this increases the existing mess even further, but the maintainers have a plan to move it to feature checks instead that are hopefully easier to understand.
Quoted 2 lines
Signed-off-by Christoph Hellwig <[email protected]>---
generic/730 is missed:
/var/lib/xfstests/tests/generic/370: line 31: _supported_fs: command not found
Anyway, I'll help to change g/370 when I merge this patch.
Thanks,
Zorro
Quoted 1,267 lines
common/rc | 30 ++++++++---------------------- tests/ext4/001 | 4 +++- tests/ext4/002 | 2 +- tests/ext4/003 | 3 ++- tests/ext4/004 | 3 ++- tests/ext4/005 | 4 +++- tests/ext4/006 | 3 ++- tests/ext4/007 | 3 ++- tests/ext4/008 | 3 ++- tests/ext4/009 | 3 ++- tests/ext4/010 | 3 ++- tests/ext4/011 | 3 ++- tests/ext4/012 | 3 ++- tests/ext4/013 | 3 ++- tests/ext4/014 | 3 ++- tests/ext4/015 | 3 ++- tests/ext4/016 | 3 ++- tests/ext4/017 | 3 ++- tests/ext4/018 | 3 ++- tests/ext4/019 | 3 ++- tests/ext4/020 | 4 +++- tests/ext4/021 | 4 +++- tests/ext4/022 | 4 +++- tests/ext4/023 | 4 +++- tests/ext4/024 | 4 +++- tests/ext4/025 | 4 +++- tests/ext4/026 | 4 +++- tests/ext4/027 | 4 +++- tests/ext4/028 | 4 +++- tests/ext4/029 | 4 +++- tests/ext4/030 | 4 +++- tests/ext4/031 | 4 +++- tests/ext4/032 | 3 ++- tests/ext4/033 | 4 +++- tests/ext4/034 | 3 ++- tests/ext4/035 | 3 ++- tests/ext4/036 | 3 ++- tests/ext4/037 | 2 +- tests/ext4/038 | 3 +-- tests/ext4/039 | 3 ++- tests/ext4/040 | 1 - tests/ext4/041 | 1 - tests/ext4/042 | 3 --- tests/ext4/043 | 2 +- tests/ext4/044 | 4 +++- tests/ext4/045 | 3 ++- tests/ext4/046 | 3 ++- tests/ext4/047 | 4 +++- tests/ext4/048 | 3 ++- tests/ext4/049 | 3 ++- tests/ext4/050 | 3 ++- tests/ext4/051 | 3 ++- tests/ext4/052 | 3 ++- tests/ext4/053 | 1 - tests/ext4/054 | 4 +++- tests/ext4/055 | 4 +++- tests/ext4/056 | 4 +++- tests/ext4/057 | 4 +++- tests/ext4/058 | 4 +++- tests/ext4/059 | 4 +++- tests/ext4/060 | 4 +++- tests/ext4/271 | 4 +++- tests/ext4/301 | 4 +++- tests/ext4/302 | 4 +++- tests/ext4/303 | 4 +++- tests/ext4/304 | 4 +++- tests/ext4/305 | 3 ++- tests/ext4/306 | 3 ++- tests/ext4/307 | 4 +++- tests/generic/187 | 8 +++++--- tests/generic/294 | 2 +- tests/generic/357 | 2 +- tests/generic/362 | 3 ++- tests/generic/465 | 2 +- tests/generic/500 | 2 +- tests/generic/631 | 4 +++- tests/generic/679 | 2 +- tests/generic/699 | 3 ++- tests/generic/732 | 4 +++- tests/generic/740 | 7 ++++++- 80 files changed, 188 insertions(+), 106 deletions(-)common/rc +8
-22@@ -1769,30 +1769,16 @@ _fail() 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" }tests/ext4/001 +3
-1@@ -14,7 +14,9 @@ _begin_fstest auto prealloc quick zero fiemap . ./common/filter . ./common/punch -_supported_fs ext4 +_exclude_fs ext2 +_exclude_fs ext3 + _require_xfs_io_command "falloc" _require_xfs_io_command "fzero" _require_testtests/ext4/002 +1
-1@@ -29,7 +29,7 @@ _cleanup() # Import common functions. . ./common/filter -_supported_fs ext4 ext3 +_exclude_fs ext2 _require_scratch_nocheck _require_scratch_shutdowntests/ext4/003 +2
-1@@ -20,7 +20,8 @@ _cleanup() # Import common functions. . ./common/filter -_supported_fs ext4 +_exclude_fs ext2 +_exclude_fs ext3 _require_scratch _require_scratch_ext4_feature "bigalloc"tests/ext4/004 +2
-1@@ -43,7 +43,8 @@ workout() rm -rf restoresymtable } -_supported_fs ext4 +_exclude_fs ext2 +_exclude_fs ext3 _require_test _require_scratchtests/ext4/005 +3
-1@@ -17,7 +17,9 @@ _begin_fstest auto quick metadata ioctl rw # Import common functions. . ./common/filter -_supported_fs ext4 +_exclude_fs ext2 +_exclude_fs ext3 + _require_scratch _require_command "$CHATTR_PROG" chattrtests/ext4/006 +2
-1@@ -28,7 +28,8 @@ if [ ! -x "$(type -P e2fuzz)" ]; then _notrun "Couldn't find e2fuzz" fi -_supported_fs ext4 +_exclude_fs ext2 +_exclude_fs ext3 _require_scratch _require_attrstests/ext4/007 +2
-1@@ -21,7 +21,8 @@ _cleanup() . ./common/filter . ./common/attr -_supported_fs ext4 +_exclude_fs ext2 +_exclude_fs ext3 _require_scratch test -n "${FORCE_FUZZ}" || _require_scratch_ext4_crctests/ext4/008 +2
-1@@ -21,7 +21,8 @@ _cleanup() . ./common/filter . ./common/attr -_supported_fs ext4 +_exclude_fs ext2 +_exclude_fs ext3 _require_scratch test -n "${FORCE_FUZZ}" || _require_scratch_ext4_crctests/ext4/009 +2
-1@@ -21,7 +21,8 @@ _cleanup() . ./common/filter . ./common/attr -_supported_fs ext4 +_exclude_fs ext2 +_exclude_fs ext3 _require_xfs_io_command "falloc" _require_scratchtests/ext4/010 +2
-1@@ -21,7 +21,8 @@ _cleanup() . ./common/filter . ./common/attr -_supported_fs ext4 +_exclude_fs ext2 +_exclude_fs ext3 _require_scratch _require_dumpe2fstests/ext4/011 +2
-1@@ -21,7 +21,8 @@ _cleanup() . ./common/filter . ./common/attr -_supported_fs ext4 +_exclude_fs ext2 +_exclude_fs ext3 _require_scratch test -n "${FORCE_FUZZ}" || _require_scratch_ext4_crctests/ext4/012 +2
-1@@ -21,7 +21,8 @@ _cleanup() . ./common/filter . ./common/attr -_supported_fs ext4 +_exclude_fs ext2 +_exclude_fs ext3 _require_scratch test -n "${FORCE_FUZZ}" || _require_scratch_ext4_crctests/ext4/013 +2
-1@@ -21,7 +21,8 @@ _cleanup() . ./common/filter . ./common/attr -_supported_fs ext4 +_exclude_fs ext2 +_exclude_fs ext3 _require_scratch test -n "${FORCE_FUZZ}" || _require_scratch_ext4_crctests/ext4/014 +2
-1@@ -21,7 +21,8 @@ _cleanup() . ./common/filter . ./common/attr -_supported_fs ext4 +_exclude_fs ext2 +_exclude_fs ext3 _require_scratch test -n "${FORCE_FUZZ}" || _require_scratch_ext4_crctests/ext4/015 +2
-1@@ -21,7 +21,8 @@ _cleanup() . ./common/filter . ./common/attr -_supported_fs ext4 +_exclude_fs ext2 +_exclude_fs ext3 _require_xfs_io_command "falloc" _require_xfs_io_command "fpunch"tests/ext4/016 +2
-1@@ -21,7 +21,8 @@ _cleanup() . ./common/filter . ./common/attr -_supported_fs ext4 +_exclude_fs ext2 +_exclude_fs ext3 _require_scratch test -n "${FORCE_FUZZ}" || _require_scratch_ext4_crctests/ext4/017 +2
-1@@ -21,7 +21,8 @@ _cleanup() . ./common/filter . ./common/attr -_supported_fs ext4 +_exclude_fs ext2 +_exclude_fs ext3 _require_scratch test -n "${FORCE_FUZZ}" || _require_scratch_ext4_crctests/ext4/018 +2
-1@@ -21,7 +21,8 @@ _cleanup() . ./common/filter . ./common/attr -_supported_fs ext4 +_exclude_fs ext2 +_exclude_fs ext3 _require_scratch test -n "${FORCE_FUZZ}" || _require_scratch_ext4_crctests/ext4/019 +2
-1@@ -21,7 +21,8 @@ _cleanup() . ./common/filter . ./common/attr -_supported_fs ext4 +_exclude_fs ext2 +_exclude_fs ext3 _require_scratch test -n "${FORCE_FUZZ}" || _require_scratch_ext4_crctests/ext4/020 +3
-1@@ -17,7 +17,9 @@ _begin_fstest auto quick ioctl rw defrag . ./common/filter . ./common/defrag -_supported_fs ext4 +_exclude_fs ext2 +_exclude_fs ext3 + _require_scratch _require_defragtests/ext4/021 +3
-1@@ -12,7 +12,9 @@ _begin_fstest auto quick # Import common functions. -_supported_fs ext4 +_exclude_fs ext2 +_exclude_fs ext3 + _require_scratch _require_dumpe2fstests/ext4/022 +3
-1@@ -18,7 +18,9 @@ do_setfattr() . ./common/filter . ./common/attr -_supported_fs ext4 +_exclude_fs ext2 +_exclude_fs ext3 + _require_scratch _require_dumpe2fs _require_command "$DEBUGFS_PROG" debugfstests/ext4/023 +3
-1@@ -18,7 +18,9 @@ _register_cleanup "_cleanup" BUS . ./common/populate . ./common/fuzzy -_supported_fs ext4 +_exclude_fs ext2 +_exclude_fs ext3 + _require_scratch echo "Format and populate"tests/ext4/024 +3
-1@@ -13,7 +13,9 @@ _begin_fstest auto quick encrypt dangerous # get standard environment and checks . ./common/encrypt -_supported_fs ext4 +_exclude_fs ext2 +_exclude_fs ext3 + _require_scratch_encryption _require_command "$KEYCTL_PROG" keyctltests/ext4/025 +3
-1@@ -13,7 +13,9 @@ _begin_fstest auto quick fuzzers dangerous # 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"tests/ext4/026 +3
-1@@ -16,7 +16,9 @@ _begin_fstest auto quick attr . ./common/filter . ./common/attr -_supported_fs ext4 +_exclude_fs ext2 +_exclude_fs ext3 + _require_scratch _require_attrs _require_scratch_ext4_feature "ea_inode"tests/ext4/027 +3
-1@@ -19,7 +19,9 @@ _cleanup() # Import common functions. . ./common/filter -_supported_fs ext4 +_exclude_fs ext2 +_exclude_fs ext3 + _require_scratch _require_xfs_io_command "fsmap"tests/ext4/028 +3
-1@@ -20,7 +20,9 @@ _cleanup() . ./common/filter . ./common/populate -_supported_fs ext4 +_exclude_fs ext2 +_exclude_fs ext3 + _require_scratch _require_populate_commands _require_xfs_io_command "fsmap"tests/ext4/029 +3
-1@@ -19,7 +19,9 @@ _cleanup() # Import common functions. . ./common/filter -_supported_fs ext4 +_exclude_fs ext2 +_exclude_fs ext3 + _require_logdev _require_scratch _require_xfs_io_command "fsmap"tests/ext4/030 +3
-1@@ -15,7 +15,9 @@ _begin_fstest auto quick dax . ./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" chattrtests/ext4/031 +3
-1@@ -19,7 +19,9 @@ SAVE_MOUNT_OPTIONS="$MOUNT_OPTIONS" 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"tests/ext4/032 +2
-1@@ -83,7 +83,8 @@ _cleanup() # get standard environment and checks -_supported_fs ext4 +_exclude_fs ext2 +_exclude_fs ext3 _require_loop _require_scratchtests/ext4/033 +3
-1@@ -24,7 +24,9 @@ _cleanup() . ./common/filter . ./common/dmhugedisk -_supported_fs ext4 +_exclude_fs ext2 +_exclude_fs ext3 + _require_scratch_nocheck _require_dmhugedisk _require_dumpe2fstests/ext4/034 +2
-1@@ -19,7 +19,8 @@ _begin_fstest auto quick quota fiemap prealloc # Modify as appropriate. -_supported_fs ext4 +_exclude_fs ext2 +_exclude_fs ext3 _require_scratch _require_quota _require_nobodytests/ext4/035 +2
-1@@ -19,7 +19,8 @@ _begin_fstest auto quick resize # 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" resize2fstests/ext4/036 +2
-1@@ -15,7 +15,8 @@ _begin_fstest auto quick # Import common functions. . ./common/filter -_supported_fs ext3 ext4 +_exclude_fs ext2 + _require_scratch echo "Silence is golden"tests/ext4/037 +1
-1@@ -15,7 +15,7 @@ _begin_fstest auto quick # Import common functions. . ./common/filter -_supported_fs ext3 ext4 +_exclude_fs ext2 # nofsck as we modify sb via debugfs _require_scratch_nochecktests/ext4/038 +1
-2@@ -10,9 +10,8 @@ . ./common/preamble _begin_fstest auto quick -# Import common functions. +_exclude_fs ext2 -_supported_fs ext3 ext4 _require_scratch _require_command "$DEBUGFS_PROG" debugfstests/ext4/039 +2
-1@@ -56,7 +56,8 @@ chattr_opt: $chattr_opt" >>$seqres.full done } -_supported_fs ext3 ext4 +_exclude_fs ext2 + _require_scratch _exclude_scratch_mount_option daxtests/ext4/040 +0
-1@@ -21,7 +21,6 @@ PIDS="" # Import common functions. . ./common/filter -_supported_fs ext2 ext3 ext4 _require_scratch_nocheck _disable_dmesg_check _require_command "$DEBUGFS_PROG"tests/ext4/041 +0
-1@@ -21,7 +21,6 @@ PIDS="" # Import common functions. . ./common/filter -_supported_fs ext2 ext3 ext4 _require_scratch_nocheck _disable_dmesg_check _require_command "$DEBUGFS_PROG"tests/ext4/042 +0
-3@@ -12,9 +12,6 @@ _begin_fstest auto quick # Import common functions. . ./common/filter - -# Modify as appropriate. -_supported_fs ext2 ext3 ext4 _require_scratch _scratch_mkfs >> $seqres.full 2>&1tests/ext4/043 +1
-1@@ -12,7 +12,7 @@ _begin_fstest auto quick # Import common functions. . ./common/filter -_supported_fs ext3 ext4 +_exclude_fs ext2 _require_scratch _require_test_program "t_get_file_time"tests/ext4/044 +3
-1@@ -12,7 +12,9 @@ _begin_fstest auto quick # 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_journalingtests/ext4/045 +2
-1@@ -16,7 +16,8 @@ LONG_DIR=2 # Import common functions. . ./common/filter -_supported_fs ext4 +_exclude_fs ext2 +_exclude_fs ext3 _require_scratch _require_scratch_ext4_feature large_dirtests/ext4/046 +2
-1@@ -16,7 +16,8 @@ _begin_fstest auto prealloc quick . ./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)) #kBtests/ext4/047 +3
-1@@ -13,7 +13,9 @@ _begin_fstest auto quick dax # 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"tests/ext4/048 +2
-1@@ -13,7 +13,8 @@ _begin_fstest auto quick dir # Import common functions. . ./common/filter -_supported_fs ext4 +_exclude_fs ext2 +_exclude_fs ext3 _require_scratch _require_command "$DEBUGFS_PROG" debugfstests/ext4/049 +2
-1@@ -13,7 +13,8 @@ _begin_fstest auto quick # Import common functions. . ./common/filter -_supported_fs ext4 +_exclude_fs ext2 +_exclude_fs ext3 _require_scratch sdev=$(_short_dev ${SCRATCH_DEV})tests/ext4/050 +2
-1@@ -13,7 +13,8 @@ _begin_fstest auto ioctl quick # Import common functions. . ./common/filter -_supported_fs ext4 +_exclude_fs ext2 +_exclude_fs ext3 _require_scratch _require_command "$DEBUGFS_PROG" debugfstests/ext4/051 +2
-1@@ -12,7 +12,8 @@ . ./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" tune2fstests/ext4/052 +2
-1@@ -29,7 +29,8 @@ _cleanup() # Modify as appropriate. -_supported_fs ext4 +_exclude_fs ext2 +_exclude_fs ext3 _require_test _require_loop _require_test_program "dirstress"tests/ext4/053 +0
-1@@ -39,7 +39,6 @@ echo "Silence is golden." SIZE=$((1024 * 1024)) # 1GB in KB LOGSIZE=$((10 *1024)) # 10MB in KB -_supported_fs ext2 ext3 ext4 _require_scratch_size $SIZE _require_quota _require_looptests/ext4/054 +3
-1@@ -17,7 +17,9 @@ _begin_fstest auto quick dangerous_fuzzers prealloc punch # 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"tests/ext4/055 +3
-1@@ -16,8 +16,10 @@ . ./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" debugfstests/ext4/056 +3
-1@@ -26,7 +26,9 @@ ONLINE_RESIZE_BLOCK_LIMIT=$((256*1024*1024)) 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"tests/ext4/057 +3
-1@@ -11,7 +11,9 @@ _begin_fstest auto ioctl # 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 uuidgentests/ext4/058 +3
-1@@ -13,7 +13,9 @@ . ./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_scratchtests/ext4/059 +3
-1@@ -11,7 +11,9 @@ . ./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"tests/ext4/060 +3
-1@@ -14,7 +14,9 @@ . ./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"tests/ext4/271 +3
-1@@ -12,7 +12,9 @@ _begin_fstest auto rw quick # 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 optiontests/ext4/301 +3
-1@@ -15,7 +15,9 @@ fio_config=$tmp.fio . ./common/filter . ./common/defrag -_supported_fs ext4 +_exclude_fs ext2 +_exclude_fs ext3 + _require_scratch _require_defrag _require_odirecttests/ext4/302 +3
-1@@ -16,7 +16,9 @@ fio_config=$tmp.fio . ./common/filter . ./common/defrag -_supported_fs ext4 +_exclude_fs ext2 +_exclude_fs ext3 + _require_scratch _require_defrag _require_odirecttests/ext4/303 +3
-1@@ -16,7 +16,9 @@ fio_config=$tmp.fio . ./common/filter . ./common/defrag -_supported_fs ext4 +_exclude_fs ext2 +_exclude_fs ext3 + _require_scratch _require_defrag _require_odirecttests/ext4/304 +3
-1@@ -17,7 +17,9 @@ fio_config=$tmp.fio . ./common/filter . ./common/defrag -_supported_fs ext4 +_exclude_fs ext2 +_exclude_fs ext3 + _require_scratch _require_defrag _require_odirecttests/ext4/305 +2
-1@@ -22,7 +22,8 @@ _cleanup() # Import common functions. . ./common/filter -_supported_fs ext4 +_exclude_fs ext2 +_exclude_fs ext3 _require_scratchtests/ext4/306 +2
-1@@ -22,7 +22,8 @@ _cleanup() # Import common functions. . ./common/filter -_supported_fs ext4 +_exclude_fs ext2 +_exclude_fs ext3 _require_scratch _require_command "$RESIZE2FS_PROG" resize2fstests/ext4/307 +3
-1@@ -34,7 +34,9 @@ _workout() run_check md5sum -c $out.md5sum } -_supported_fs ext4 +_exclude_fs ext2 +_exclude_fs ext3 + _require_scratch _require_defrag _require_xfs_io_command "falloc"tests/generic/187 +5
-3@@ -28,10 +28,12 @@ _cleanup() . ./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"tests/generic/294 +1
-1@@ -16,7 +16,7 @@ _begin_fstest auto quick # 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_symlinkstests/generic/357 +1
-1@@ -26,7 +26,7 @@ _cleanup() # 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_reflinktests/generic/362 +2
-1@@ -11,7 +11,8 @@ _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-faulttests/generic/465 +1
-1@@ -20,7 +20,7 @@ _cleanup() # Import common functions. . ./common/filter -_supported_fs ^nfs +_exclude_fs nfs _require_aiodio aio-dio-append-write-read-race _require_test_program "feature"tests/generic/500 +1
-1@@ -41,7 +41,7 @@ _require_dm_target thin-pool # 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>&1tests/generic/631 +3
-1@@ -37,8 +37,10 @@ _cleanup() _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"tests/generic/679 +1
-1@@ -23,7 +23,7 @@ _require_xfs_io_command "fiemap" # # https://lore.kernel.org/linux-btrfs/20220315164011.GF8241@magnolia/ # -_supported_fs ^xfs +_exclude_fs xfs rm -f $seqres.fulltests/generic/699 +2
-1@@ -21,8 +21,9 @@ _cleanup() rm -r -f $tmp.* } -_supported_fs ^overlay +_exclude_fs overlay _require_extra_fs overlay + _require_scratch _require_chown _require_idmapped_mountstests/generic/732 +3
-1@@ -24,7 +24,9 @@ _cleanup() # 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_scratchtests/generic/740 +6
-1@@ -14,7 +14,12 @@ _begin_fstest mkfs auto quick # 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 deviceSignature · 1 line
2.45.2
Re: [PATCH 3/3] replace _supported_fs with _exclude_fs
Quoted 5 lines · Zorro Lang
generic/730 is missed:
/var/lib/xfstests/tests/generic/370: line 31:_supported_fs: command not foundAnyway, I'll help to change g/370 when I merge this patch.
generic/730 didn't exist when I submitted this series, you applied it in the same batch of patches.
But it really should not skip xfs to start with. Either the test is correct and XFS should fail it (and get fixed) or the test is incorrect and it should not be added. I suspect it is the former and I'll look into fixing it.
As added in the comments in this series we should never add a _exclude_fs without a very good reason and comment explaining it.
Re: [PATCH 3/3] replace _supported_fs with _exclude_fs
Quoted 9 lines · Christoph Hellwig
Quoted 5 lines · Zorro Lang
generic/730 is missed:
/var/lib/xfstests/tests/generic/370: line 31:_supported_fs: command not foundAnyway, I'll help to change g/370 when I merge this patch.
generic/730 didn't exist when I submitted this series, you applied it in the same batch of patches.
Yeah, sorry it's from another patch which was in the same fstests release with yours :) I've fix this "conflict" and pushed, please refer to the latest for-next branch.
Thanks,
Zorro
Quoted 9 lines
But it really should not skip xfs to start with. Either the test is correct and XFS should fail it (and get fixed) or the test is incorrect and it should not be added. I suspect it is the former and I'll look into fixing it.
As added in the comments in this series we should never add a
_exclude_fswithout a very good reason and comment explaining it.