remove _supported_fs
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.
Then the ext4 directory is split so that the shared extN tests have their own directory, and then it finally does the switch over now that now many _supported_fs calls are left.
PATCH 1/4 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/4] generic/363: remove _supported_fs xfs
Quoted 13 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]>--- tests/generic/363 | 3 --- 1 file changed, 3 deletions(-)tests/generic/363 +0
-0
tests/generic/363 _begin_fstest rw auto · line 18
Quoted 6 lines
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 -
IIRC pretty much every fs except for xfs failed this test when I wrote it, so I didn't want to drop it on folks until I had a chance to look into it. I had pending ext4 fixes which appear to have now been merged, so on a quick test of -rc2 this now passes on ext4.
I haven't got to the others, but if it's particularly disruptive for anybody I suppose it could still be excluded easy enough:
Quoted 7 lines
tests/generic/363 +0
-0# 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
PATCH 2/4 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
PATCH 3/4 ext-common: create a new test directory for ext* common tests
In reply to Christoph HellwigSplit the tests shared with ext2 and ext3 from the ext4 directory. This makes ext4 a normal file system specific directory and cuts down the number of _supported_fs calls to a little more than a handful for tests that can't run on ext2.
---
check | 9 +++++----
tests/{ext4 => ext-common}/002 | 2 +-
tests/{ext4 => ext-common}/002.out | 0
tests/{ext4 => ext-common}/036 | 2 +-
tests/{ext4 => ext-common}/036.out | 0
tests/{ext4 => ext-common}/037 | 2 +-
tests/{ext4 => ext-common}/037.out | 0
tests/{ext4 => ext-common}/038 | 2 +-
tests/{ext4 => ext-common}/038.out | 0
tests/{ext4 => ext-common}/039 | 2 +-
tests/{ext4 => ext-common}/039.out | 0
tests/{ext4 => ext-common}/040 | 1 -
tests/{ext4 => ext-common}/040.out | 0
tests/{ext4 => ext-common}/041 | 1 -
tests/{ext4 => ext-common}/041.out | 0
tests/{ext4 => ext-common}/042 | 3 ---
tests/{ext4 => ext-common}/042.out | 0
tests/{ext4 => ext-common}/043 | 2 +-
tests/{ext4 => ext-common}/043.out | 0
tests/{ext4 => ext-common}/053 | 1 -
tests/{ext4 => ext-common}/053.out | 0
tests/ext-common/Makefile | 24 ++++++++++++++++++++++++
tests/ext4/001 | 1 -
tests/ext4/003 | 2 --
tests/ext4/004 | 2 --
tests/ext4/005 | 1 -
tests/ext4/006 | 2 --
tests/ext4/007 | 2 --
tests/ext4/008 | 2 --
tests/ext4/009 | 2 --
tests/ext4/010 | 2 --
tests/ext4/011 | 2 --
tests/ext4/012 | 2 --
tests/ext4/013 | 2 --
tests/ext4/014 | 2 --
tests/ext4/015 | 2 --
tests/ext4/016 | 2 --
tests/ext4/017 | 2 --
tests/ext4/018 | 2 --
tests/ext4/019 | 2 --
tests/ext4/020 | 1 -
tests/ext4/021 | 1 -
tests/ext4/022 | 1 -
tests/ext4/023 | 1 -
tests/ext4/024 | 1 -
tests/ext4/025 | 1 -
tests/ext4/026 | 1 -
tests/ext4/027 | 1 -
tests/ext4/028 | 1 -
tests/ext4/029 | 1 -
tests/ext4/030 | 2 --
tests/ext4/031 | 2 --
tests/ext4/032 | 2 --
tests/ext4/033 | 1 -
tests/ext4/034 | 3 ---
tests/ext4/035 | 1 -
tests/ext4/044 | 1 -
tests/ext4/045 | 2 --
tests/ext4/046 | 1 -
tests/ext4/047 | 1 -
tests/ext4/048 | 2 --
tests/ext4/049 | 1 -
tests/ext4/050 | 2 --
tests/ext4/051 | 1 -
tests/ext4/052 | 3 ---
tests/ext4/054 | 1 -
tests/ext4/055 | 1 -
tests/ext4/056 | 1 -
tests/ext4/057 | 1 -
tests/ext4/058 | 1 -
tests/ext4/059 | 1 -
tests/ext4/060 | 1 -
tests/ext4/271 | 1 -
tests/ext4/301 | 1 -
tests/ext4/302 | 1 -
tests/ext4/303 | 1 -
tests/ext4/304 | 1 -
tests/ext4/305 | 2 --
tests/ext4/306 | 2 --
tests/ext4/307 | 1 -
80 files changed, 35 insertions(+), 102 deletions(-)
rename tests/{ext4 => ext-common}/002 (99%)
rename tests/{ext4 => ext-common}/002.out (100%)
rename tests/{ext4 => ext-common}/036 (97%)
rename tests/{ext4 => ext-common}/036.out (100%)
rename tests/{ext4 => ext-common}/037 (96%)
rename tests/{ext4 => ext-common}/037.out (100%)
rename tests/{ext4 => ext-common}/038 (97%)
rename tests/{ext4 => ext-common}/038.out (100%)
rename tests/{ext4 => ext-common}/039 (98%)
rename tests/{ext4 => ext-common}/039.out (100%)
rename tests/{ext4 => ext-common}/040 (98%)
rename tests/{ext4 => ext-common}/040.out (100%)
rename tests/{ext4 => ext-common}/041 (98%)
rename tests/{ext4 => ext-common}/041.out (100%)
rename tests/{ext4 => ext-common}/042 (97%)
rename tests/{ext4 => ext-common}/042.out (100%)
rename tests/{ext4 => ext-common}/043 (97%)
rename tests/{ext4 => ext-common}/043.out (100%)
rename tests/{ext4 => ext-common}/053 (99%)
rename tests/{ext4 => ext-common}/053.out (100%)
create mode 100644 tests/ext-common/Makefilecheck +5 -4
@@ -143,7 +143,7 @@ get_group_list() local grp=$1 local grpl="" local sub=$(dirname $grp) - local fsgroup="$FSTYP" + local fsgroups="$FSTYP" if [ -n "$sub" -a "$sub" != "." -a -d "$SRC_DIR/$sub" ]; then # group is given as <subdir>/<group> (e.g. xfs/quick)
@@ -152,10 +152,11 @@ get_group_list() return fi - if [ "$FSTYP" = ext2 -o "$FSTYP" = ext3 ]; then - fsgroup=ext4 + if [ "$FSTYP" = ext2 -o "$FSTYP" = ext3 -o "$FSTYP" = ext4 ]; then + fsgroups="$fsgroups ext-common" fi - for d in $SRC_GROUPS $fsgroup; do + + for d in $SRC_GROUPS $fsgroups; do if ! test -d "$SRC_DIR/$d" ; then continue fi
tests/ext-common/002 renamed from tests/ext4/002 +1 -1
@@ -29,7 +29,7 @@ _cleanup() # Import common functions. . ./common/filter -_supported_fs ext4 ext3 +_supported_fs ^ext2 _require_scratch_nocheck _require_scratch_shutdown
tests/ext-common/002.out renamed from tests/ext4/002.out +0 -0
tests/ext-common/036 renamed from tests/ext4/036 +1 -1
@@ -15,7 +15,7 @@ _begin_fstest auto quick # Import common functions. . ./common/filter -_supported_fs ext3 ext4 +_supported_fs ^ext2 _require_scratch echo "Silence is golden"
tests/ext-common/036.out renamed from tests/ext4/036.out +0 -0
tests/ext-common/037 renamed from tests/ext4/037 +1 -1
@@ -15,7 +15,7 @@ _begin_fstest auto quick # Import common functions. . ./common/filter -_supported_fs ext3 ext4 +_supported_fs ^ext2 # nofsck as we modify sb via debugfs _require_scratch_nocheck
tests/ext-common/037.out renamed from tests/ext4/037.out +0 -0
tests/ext-common/038 renamed from tests/ext4/038 +1 -1
@@ -12,7 +12,7 @@ _begin_fstest auto quick # Import common functions. -_supported_fs ext3 ext4 +_supported_fs ^ext2 _require_scratch _require_command "$DEBUGFS_PROG" debugfs
tests/ext-common/038.out renamed from tests/ext4/038.out +0 -0
tests/ext-common/039 renamed from tests/ext4/039 +1 -1
@@ -56,7 +56,7 @@ chattr_opt: $chattr_opt" >>$seqres.full done } -_supported_fs ext3 ext4 +_supported_fs ^ext2 _require_scratch _exclude_scratch_mount_option dax
tests/ext-common/039.out renamed from tests/ext4/039.out +0 -0
tests/ext-common/040 renamed from 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/ext-common/040.out renamed from tests/ext4/040.out +0 -0
tests/ext-common/041 renamed from 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/ext-common/041.out renamed from tests/ext4/041.out +0 -0
tests/ext-common/042 renamed from 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/ext-common/042.out renamed from tests/ext4/042.out +0 -0
tests/ext-common/043 renamed from tests/ext4/043 +1 -1
@@ -12,7 +12,7 @@ _begin_fstest auto quick # Import common functions. . ./common/filter -_supported_fs ext3 ext4 +_supported_fs ^ext2 _require_scratch _require_test_program "t_get_file_time"
tests/ext-common/043.out renamed from tests/ext4/043.out +0 -0
tests/ext-common/053 renamed from 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/ext-common/053.out renamed from tests/ext4/053.out +0 -0
tests/ext-common/Makefile new file +24 -0
@@ -0,0 +1,24 @@ +# +# Copyright (c) 2003-2005 Silicon Graphics, Inc. All Rights Reserved. +# + +TOPDIR = ../.. +include $(TOPDIR)/include/builddefs +include $(TOPDIR)/include/buildgrouplist + +THIS_DIR = ext-common +TARGET_DIR = $(PKG_LIB_DIR)/$(TESTS_DIR)/$(THIS_DIR) +DIRT = group.list + +default: $(DIRT) + +include $(BUILDRULES) + +install: default + $(INSTALL) -m 755 -d $(TARGET_DIR) + $(INSTALL) -m 755 $(TESTS) $(TARGET_DIR) + $(INSTALL) -m 644 group.list $(TARGET_DIR) + $(INSTALL) -m 644 $(OUTFILES) $(TARGET_DIR) + +# Nothing. +install-dev install-lib:
tests/ext4/001 +0 -1
@@ -14,7 +14,6 @@ _begin_fstest auto prealloc quick zero fiemap . ./common/filter . ./common/punch -_supported_fs ext4 _require_xfs_io_command "falloc" _require_xfs_io_command "fzero" _require_test
tests/ext4/003 +0 -2
@@ -20,8 +20,6 @@ _cleanup() # Import common functions. . ./common/filter -_supported_fs ext4 - _require_scratch _require_scratch_ext4_feature "bigalloc"
tests/ext4/004 +0 -2
@@ -43,8 +43,6 @@ workout() rm -rf restoresymtable } -_supported_fs ext4 - _require_test _require_scratch
tests/ext4/005 +0 -1
@@ -17,7 +17,6 @@ _begin_fstest auto quick metadata ioctl rw # Import common functions. . ./common/filter -_supported_fs ext4 _require_scratch _require_command "$CHATTR_PROG" chattr
tests/ext4/006 +0 -2
@@ -28,8 +28,6 @@ if [ ! -x "$(type -P e2fuzz)" ]; then _notrun "Couldn't find e2fuzz" fi -_supported_fs ext4 - _require_scratch _require_attrs _require_populate_commands
tests/ext4/007 +0 -2
@@ -21,8 +21,6 @@ _cleanup() . ./common/filter . ./common/attr -_supported_fs ext4 - _require_scratch test -n "${FORCE_FUZZ}" || _require_scratch_ext4_crc _require_attrs
tests/ext4/008 +0 -2
@@ -21,8 +21,6 @@ _cleanup() . ./common/filter . ./common/attr -_supported_fs ext4 - _require_scratch test -n "${FORCE_FUZZ}" || _require_scratch_ext4_crc _require_attrs
tests/ext4/009 +0 -2
@@ -21,8 +21,6 @@ _cleanup() . ./common/filter . ./common/attr -_supported_fs ext4 - _require_xfs_io_command "falloc" _require_scratch test -n "${FORCE_FUZZ}" || _require_scratch_ext4_crc
tests/ext4/010 +0 -2
@@ -21,8 +21,6 @@ _cleanup() . ./common/filter . ./common/attr -_supported_fs ext4 - _require_scratch _require_dumpe2fs test -n "${FORCE_FUZZ}" || _require_scratch_ext4_crc
tests/ext4/011 +0 -2
@@ -21,8 +21,6 @@ _cleanup() . ./common/filter . ./common/attr -_supported_fs ext4 - _require_scratch test -n "${FORCE_FUZZ}" || _require_scratch_ext4_crc _require_attrs
tests/ext4/012 +0 -2
@@ -21,8 +21,6 @@ _cleanup() . ./common/filter . ./common/attr -_supported_fs ext4 - _require_scratch test -n "${FORCE_FUZZ}" || _require_scratch_ext4_crc _require_attrs
tests/ext4/013 +0 -2
@@ -21,8 +21,6 @@ _cleanup() . ./common/filter . ./common/attr -_supported_fs ext4 - _require_scratch test -n "${FORCE_FUZZ}" || _require_scratch_ext4_crc _require_attrs
tests/ext4/014 +0 -2
@@ -21,8 +21,6 @@ _cleanup() . ./common/filter . ./common/attr -_supported_fs ext4 - _require_scratch test -n "${FORCE_FUZZ}" || _require_scratch_ext4_crc _require_attrs
tests/ext4/015 +0 -2
@@ -21,8 +21,6 @@ _cleanup() . ./common/filter . ./common/attr -_supported_fs ext4 - _require_xfs_io_command "falloc" _require_xfs_io_command "fpunch" _require_scratch
tests/ext4/016 +0 -2
@@ -21,8 +21,6 @@ _cleanup() . ./common/filter . ./common/attr -_supported_fs ext4 - _require_scratch test -n "${FORCE_FUZZ}" || _require_scratch_ext4_crc _require_attrs
tests/ext4/017 +0 -2
@@ -21,8 +21,6 @@ _cleanup() . ./common/filter . ./common/attr -_supported_fs ext4 - _require_scratch test -n "${FORCE_FUZZ}" || _require_scratch_ext4_crc _require_attrs
tests/ext4/018 +0 -2
@@ -21,8 +21,6 @@ _cleanup() . ./common/filter . ./common/attr -_supported_fs ext4 - _require_scratch test -n "${FORCE_FUZZ}" || _require_scratch_ext4_crc _require_attrs
tests/ext4/019 +0 -2
@@ -21,8 +21,6 @@ _cleanup() . ./common/filter . ./common/attr -_supported_fs ext4 - _require_scratch test -n "${FORCE_FUZZ}" || _require_scratch_ext4_crc _require_attrs
tests/ext4/020 +0 -1
@@ -17,7 +17,6 @@ _begin_fstest auto quick ioctl rw defrag . ./common/filter . ./common/defrag -_supported_fs ext4 _require_scratch _require_defrag
tests/ext4/021 +0 -1
@@ -12,7 +12,6 @@ _begin_fstest auto quick # Import common functions. -_supported_fs ext4 _require_scratch _require_dumpe2fs
tests/ext4/022 +0 -1
@@ -18,7 +18,6 @@ do_setfattr() . ./common/filter . ./common/attr -_supported_fs ext4 _require_scratch _require_dumpe2fs _require_command "$DEBUGFS_PROG" debugfs
tests/ext4/023 +0 -1
@@ -18,7 +18,6 @@ _register_cleanup "_cleanup" BUS . ./common/populate . ./common/fuzzy -_supported_fs ext4 _require_scratch echo "Format and populate"
tests/ext4/024 +0 -1
@@ -13,7 +13,6 @@ _begin_fstest auto quick encrypt dangerous # get standard environment and checks . ./common/encrypt -_supported_fs ext4 _require_scratch_encryption _require_command "$KEYCTL_PROG" keyctl
tests/ext4/025 +0 -1
@@ -13,7 +13,6 @@ _begin_fstest auto quick fuzzers dangerous # get standard environment and checks . ./common/filter -_supported_fs ext4 _require_scratch_nocheck _require_command "$DEBUGFS_PROG" debugfs _require_scratch_ext4_feature "bigalloc,meta_bg,^resize_inode"
tests/ext4/026 +0 -1
@@ -16,7 +16,6 @@ _begin_fstest auto quick attr . ./common/filter . ./common/attr -_supported_fs ext4 _require_scratch _require_attrs _require_scratch_ext4_feature "ea_inode"
tests/ext4/027 +0 -1
@@ -19,7 +19,6 @@ _cleanup() # Import common functions. . ./common/filter -_supported_fs ext4 _require_scratch _require_xfs_io_command "fsmap"
tests/ext4/028 +0 -1
@@ -20,7 +20,6 @@ _cleanup() . ./common/filter . ./common/populate -_supported_fs ext4 _require_scratch _require_populate_commands _require_xfs_io_command "fsmap"
tests/ext4/029 +0 -1
@@ -19,7 +19,6 @@ _cleanup() # Import common functions. . ./common/filter -_supported_fs ext4 _require_logdev _require_scratch _require_xfs_io_command "fsmap"
tests/ext4/030 +0 -2
@@ -14,8 +14,6 @@ _begin_fstest auto quick dax # Import common functions. . ./common/filter -# Modify as appropriate. -_supported_fs ext4 _require_scratch_dax_mountopt "dax" _require_test_program "t_ext4_dax_journal_corruption" _require_command "$CHATTR_PROG" chattr
tests/ext4/031 +0 -2
@@ -18,8 +18,6 @@ _begin_fstest auto quick dax SAVE_MOUNT_OPTIONS="$MOUNT_OPTIONS" MOUNT_OPTIONS="" -# Modify as appropriate. -_supported_fs ext4 _require_scratch_dax_mountopt "dax" _require_test_program "t_ext4_dax_inline_corruption" _require_scratch_ext4_feature "inline_data"
tests/ext4/032 +0 -2
@@ -83,8 +83,6 @@ _cleanup() # get standard environment and checks -_supported_fs ext4 - _require_loop _require_scratch # We use resize_inode to make sure that block group descriptor table
tests/ext4/033 +0 -1
@@ -24,7 +24,6 @@ _cleanup() . ./common/filter . ./common/dmhugedisk -_supported_fs ext4 _require_scratch_nocheck _require_dmhugedisk _require_dumpe2fs
tests/ext4/034 +0 -3
@@ -17,9 +17,6 @@ _begin_fstest auto quick quota fiemap prealloc . ./common/filter . ./common/quota - -# Modify as appropriate. -_supported_fs ext4 _require_scratch _require_quota _require_nobody
tests/ext4/035 +0 -1
@@ -19,7 +19,6 @@ _begin_fstest auto quick resize # Import common functions. . ./common/filter -_supported_fs ext4 _require_scratch _exclude_scratch_mount_option dax _require_command "$RESIZE2FS_PROG" resize2fs
tests/ext4/044 +0 -1
@@ -12,7 +12,6 @@ _begin_fstest auto quick # Import common functions. . ./common/filter -_supported_fs ext4 _require_scratch _require_test_program "t_get_file_time" _require_metadata_journaling
tests/ext4/045 +0 -2
@@ -16,8 +16,6 @@ LONG_DIR=2 # Import common functions. . ./common/filter -_supported_fs ext4 - _require_scratch _require_scratch_ext4_feature large_dir _require_test_program "t_create_short_dirs"
tests/ext4/046 +0 -1
@@ -16,7 +16,6 @@ _begin_fstest auto prealloc quick . ./common/filter _require_check_dmesg -_supported_fs ext4 _require_scratch _require_xfs_io_command "falloc" _require_scratch_size $((6 * 1024 * 1024)) #kB
tests/ext4/047 +0 -1
@@ -13,7 +13,6 @@ _begin_fstest auto quick dax # Import common functions. . ./common/filter -_supported_fs ext4 _require_scratch_dax_mountopt "dax=always" _require_dax_iflag _require_scratch_ext4_feature "inline_data"
tests/ext4/048 +0 -2
@@ -13,8 +13,6 @@ _begin_fstest auto quick dir # Import common functions. . ./common/filter -_supported_fs ext4 - _require_scratch _require_command "$DEBUGFS_PROG" debugfs
tests/ext4/049 +0 -1
@@ -13,7 +13,6 @@ _begin_fstest auto quick # Import common functions. . ./common/filter -_supported_fs ext4 _require_scratch sdev=$(_short_dev ${SCRATCH_DEV})
tests/ext4/050 +0 -2
@@ -13,8 +13,6 @@ _begin_fstest auto ioctl quick # Import common functions. . ./common/filter -_supported_fs ext4 - _require_scratch _require_command "$DEBUGFS_PROG" debugfs
tests/ext4/051 +0 -1
@@ -12,7 +12,6 @@ . ./common/preamble _begin_fstest auto rw quick -_supported_fs ext4 _require_scratch _require_scratch_shutdown _require_command "$TUNE2FS_PROG" tune2fs
tests/ext4/052 +0 -3
@@ -27,9 +27,6 @@ _cleanup() # Import common functions. # . ./common/filter - -# Modify as appropriate. -_supported_fs ext4 _require_test _require_loop _require_test_program "dirstress"
tests/ext4/054 +0 -1
@@ -17,7 +17,6 @@ _begin_fstest auto quick dangerous_fuzzers prealloc punch # Import common functions . ./common/filter -_supported_fs ext4 _require_scratch_nocheck _require_xfs_io_command "falloc" _require_xfs_io_command "pwrite"
tests/ext4/055 +0 -1
@@ -17,7 +17,6 @@ _begin_fstest auto quota _require_scratch_nocheck -_supported_fs ext4 _require_user fsgqa _require_user fsgqa2 _require_command "$DEBUGFS_PROG" debugfs
tests/ext4/056 +0 -1
@@ -26,7 +26,6 @@ ONLINE_RESIZE_BLOCK_LIMIT=$((256*1024*1024)) STOP_ITER=255 # Arbitrary return code -_supported_fs ext4 _require_scratch_size $(($RESIZED_FS_SIZE/1024)) _require_test_program "ext4_resize"
tests/ext4/057 +0 -1
@@ -11,7 +11,6 @@ _begin_fstest auto ioctl # Import common functions. . ./common/filter -_supported_fs ext4 _require_scratch _require_test_program uuid_ioctl _require_command $UUIDGEN_PROG uuidgen
tests/ext4/058 +0 -1
@@ -13,7 +13,6 @@ . ./common/preamble _begin_fstest auto quick -_supported_fs ext4 _fixed_by_kernel_commit a08f789d2ab5 \ "ext4: fix bug_on ext4_mb_use_inode_pa" _require_scratch
tests/ext4/059 +0 -1
@@ -11,7 +11,6 @@ . ./common/preamble _begin_fstest auto resize quick -_supported_fs ext4 _fixed_by_kernel_commit b55c3cd102a6 \ "ext4: add reserved GDT blocks check"
tests/ext4/060 +0 -1
@@ -14,7 +14,6 @@ . ./common/preamble _begin_fstest auto resize quick -_supported_fs ext4 _fixed_by_kernel_commit a6b3bfe176e8 \ "ext4: fix corruption during on-line resize"
tests/ext4/271 +0 -1
@@ -12,7 +12,6 @@ _begin_fstest auto rw quick # Import common functions. . ./common/filter -_supported_fs ext4 _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 +0 -1
@@ -15,7 +15,6 @@ fio_config=$tmp.fio . ./common/filter . ./common/defrag -_supported_fs ext4 _require_scratch _require_defrag _require_odirect
tests/ext4/302 +0 -1
@@ -16,7 +16,6 @@ fio_config=$tmp.fio . ./common/filter . ./common/defrag -_supported_fs ext4 _require_scratch _require_defrag _require_odirect
tests/ext4/303 +0 -1
@@ -16,7 +16,6 @@ fio_config=$tmp.fio . ./common/filter . ./common/defrag -_supported_fs ext4 _require_scratch _require_defrag _require_odirect
tests/ext4/304 +0 -1
@@ -17,7 +17,6 @@ fio_config=$tmp.fio . ./common/filter . ./common/defrag -_supported_fs ext4 _require_scratch _require_defrag _require_odirect
tests/ext4/305 +0 -2
@@ -22,8 +22,6 @@ _cleanup() # Import common functions. . ./common/filter -_supported_fs ext4 - _require_scratch echo "Silence is golden"
tests/ext4/306 +0 -2
@@ -22,8 +22,6 @@ _cleanup() # Import common functions. . ./common/filter -_supported_fs ext4 - _require_scratch _require_command "$RESIZE2FS_PROG" resize2fs
tests/ext4/307 +0 -1
@@ -34,7 +34,6 @@ _workout() run_check md5sum -c $out.md5sum } -_supported_fs ext4 _require_scratch _require_defrag _require_xfs_io_command "falloc"
Signature · 1 line
2.45.2
Re: [PATCH 3/4] ext-common: create a new test directory for ext* common tests
Quoted 6 lines · Christoph Hellwig
Split the tests shared with ext2 and ext3 from the ext4 directory. This makes ext4 a normal file system specific directory and cuts down the number of
_supported_fscalls to a little more than a handful for tests that can't run on ext2.Signed-off-by Christoph Hellwig <[email protected]>
So I went through all ext4 tests and I think:
ext4/004 should work for all ext? types -> move to ext_common
ext4/006 should work for all ext? types -> move to ext_common ext4/007 should work for all ext? types -> move to ext_common ext4/008 should work for all ext? types -> move to ext_common ext4/009 should work for all ext? types -> move to ext_common ext4/010 should work for all ext? types -> move to ext_common ext4/011 should work for all ext? types -> move to ext_common ext4/012 should work for all ext? types -> move to ext_common ext4/013 should work for all ext? types -> move to ext_common ext4/014 should work for all ext? types -> move to ext_common ext4/016 should work for all ext? types -> move to ext_common
- but I've now noticed that the last ten call _scratch_mkfs_ext4 instead of _scratch_mkfs so that would need fixing up. So maybe leave it as is for now
ext4/017 should work for all ext3 & ext4 types -> move to ext_common
- similar caveat with _scratch_mkfs_ext4
ext4/018 should work for all ext? types -> move to ext_common ext4/019 should work for all ext? types -> move to ext_common
- similar caveat with _scratch_mkfs_ext4
ext4/022 should work for ext3 & ext4 -> move to ext_common ext4/023 should work for all ext? types -> move to ext_common
ext4/044 should work for all ext? types -> move to ext_common
Honza
Signature · 2 lines
Jan Kara <[email protected]> SUSE Labs, CR
Re: [PATCH 3/4] ext-common: create a new test directory for ext* common tests
Quoted 1 line · Jan Kara
So I went through all ext4 tests and I think:
Most of these simply fail due to unsupported features on anything but ext4.
ext4/022 actually runs on ext2 and ext3 and fails
ext4/023 actually runs on ext2 and ext3 and fails
ext4/044 runs everywhere, but always forces an ext3 file system anyway which is a bit odd.
PATCH 4/4 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 pick the extN variants supported for the ext4 directory.
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.
--- common/rc | 30 ++++++++---------------------- tests/ext-common/002 | 2 +- tests/ext-common/036 | 3 ++- tests/ext-common/037 | 2 +- tests/ext-common/038 | 3 +-- tests/ext-common/039 | 3 ++- tests/ext-common/043 | 2 +- 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 ++++++- 18 files changed, 42 insertions(+), 42 deletions(-)
common/rc +8 -22
@@ -1766,30 +1766,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/ext-common/002 +1 -1
@@ -29,7 +29,7 @@ _cleanup() # Import common functions. . ./common/filter -_supported_fs ^ext2 +_exclude_fs ext2 _require_scratch_nocheck _require_scratch_shutdown
tests/ext-common/036 +2 -1
@@ -15,7 +15,8 @@ _begin_fstest auto quick # Import common functions. . ./common/filter -_supported_fs ^ext2 +_exclude_fs ext2 + _require_scratch echo "Silence is golden"
tests/ext-common/037 +1 -1
@@ -15,7 +15,7 @@ _begin_fstest auto quick # Import common functions. . ./common/filter -_supported_fs ^ext2 +_exclude_fs ext2 # nofsck as we modify sb via debugfs _require_scratch_nocheck
tests/ext-common/038 +1 -2
@@ -10,9 +10,8 @@ . ./common/preamble _begin_fstest auto quick -# Import common functions. +_exclude_fs ext2 -_supported_fs ^ext2 _require_scratch _require_command "$DEBUGFS_PROG" debugfs
tests/ext-common/039 +2 -1
@@ -56,7 +56,8 @@ chattr_opt: $chattr_opt" >>$seqres.full done } -_supported_fs ^ext2 +_exclude_fs ext2 + _require_scratch _exclude_scratch_mount_option dax
tests/ext-common/043 +1 -1
@@ -12,7 +12,7 @@ _begin_fstest auto quick # Import common functions. . ./common/filter -_supported_fs ^ext2 +_exclude_fs ext2 _require_scratch _require_test_program "t_get_file_time"
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
Quoted 10 lines · Christoph Hellwig
this series removes the remaining
_supported_fscalls and replaces them with a new_exclude_fscall.The first patch removes a
_supported_fsfor 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.Then the ext4 directory is split so that the shared extN tests have their own directory, and then it finally does the switch over now that now many
_supported_fscalls are left.
Hmm, instead of doing this (would require hard-coding support for ext2 and ext3 file systems needing to use ext-common), why not just have special-case code which causes ext2 and ext3 file systems to include the ext4 group, and then we'll have _exclude_fs declaractions as needed for ext2 and ext3?
After all, ext3 has been removed except for the very oldest LTS kernels (and I dount anyone is actually testing ext3 using xfstests these days), and ext2 is not used by most distributions (they use CONFIG_EXT4_USE_EXT2) and the reason why we've kept it around is that it's a realtively simple file system that still uses the more modern, non-legacy vfs/mm interfaces.
So it might not be worth it to move a bunch of tests and creating a new (somewhat ugly) group, ext4-common, IMO.
Cheers,
- Ted
Quoted 5 lines · Theodore Ts'o
Hmm, instead of doing this (would require hard-coding support for ext2 and ext3 file systems needing to use ext-common), why not just have special-case code which causes ext2 and ext3 file systems to include the ext4 group, and then we'll have
_exclude_fsdeclaractions as needed for ext2 and ext3?
That's what the current tree does and what I want to get away from. I think the diffstat alone makes it pretty clear that moving away form that is a benefit, and it's also a lot easier to understand than that ext2 and ext3 magically run ext4 tests.
Quoted 3 lines
After all, ext3 has been removed except for the very oldest LTS kernels (and I dount anyone is actually testing ext3 using xfstests these days),
The tests also cover using ext4 as the ext3 driver.
Quoted 2 lines
So it might not be worth it to move a bunch of tests and creating a new (somewhat ugly) group, ext4-common, IMO.
І'll let Jan speak up, but the only thing cleaner would be to drop the ext2/3 coverage, but І don't think the extra group is too bad, and certainly much better than what we currently have.
Quoted 3 lines · Christoph Hellwig
I think the diffstat alone makes it pretty clear that moving away form that is a benefit, and it's also a lot easier to understand than that ext2 and ext3 magically run ext4 tests.
We talked about this on the weekly ext4 video chat, and I think what we'd think is actually cleaner is to have a single directory for all ext2/ext3/ext4 tests, and then eventually, have feature-specific guards which skip a test if a particular feature isn't supported by a particular file system.
It's always been my position that ext2, ext3, and ext4 are effectively the same file system from a conceptual perspective, with multiple implementations that support different subsets of file system features. This includes /usr/src/linux/fs/ext2, /usr/src/linux/fs/ext3 (before we removed it from more recent rernels), /usr/src/linux/fs/ext4, HURD's implementation of ext2, NetBSD/FreeBSD's implementation of ext2, etc.
So effectively, what I'm proposing is that we use xfstests/tests/ext4 effectively as "extN", which would be used when testing with FSTYP=ext[234].
Yes, we'll need to do some cleanup to add feature guards (e.g., _require_metadata_journaling, and "_require_scratch_ext4_feature mmp") instead of _exclude_fs ext2, but in the end, I think this will be cleaner and easier to understand since we'll know exactly what the test is testing.
Cheers,
- Ted