don't fail tests when mkfs options collide
Hi all,
I've been running some tests with forced large log sizes, and forced sector sizes, and get a fair amount of failures because these options collide with options forced by the tests themselves. The series here was my attempt to fix this by not failing the tests in this case but _notrun them and print the options that caused them to fail.
Changes since RFC:
- rebased to the patches-in-queue branch
PATCH 1/4 common: _notrun if _scratch_mkfs_sized failed
If we fail to create a file system of a specific size that means it can't work with some of the options in $MKFS_OPTIONS like the log size. Don't fail the test case for that, but instead _norun it and display the options that caused it to fail.
--- common/rc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
common/rc +1 -1
@@ -1168,7 +1168,7 @@ _try_scratch_mkfs_sized() _scratch_mkfs_sized() { - _try_scratch_mkfs_sized $* || _fail "_scratch_mkfs_sized failed with ($*)" + _try_scratch_mkfs_sized $* || _notrun "_scratch_mkfs_sized failed with ($*)" } # Emulate an N-data-disk stripe w/ various stripe units
Signature · 1 line
2.43.0
PATCH 2/4 common: _notrun if _scratch_mkfs_xfs failed
In reply to Christoph HellwigIf we fail to create a file system with specific passed in options, that that these options conflict with other options $MKFS_OPTIONS. Don't fail the test case for that, but instead _norun it and display the options that caused it to fail.
Add a lower-level _try_scratch_mkfs_xfs helper for those places that want to check the return value.
--- common/attr | 4 ++-- common/filestreams | 2 +- common/log | 4 ++-- common/rc | 9 +++++---- common/xfs | 28 +++++++++++++++++----------- tests/generic/083 | 3 +-- tests/xfs/002 | 2 +- tests/xfs/004 | 2 +- tests/xfs/005 | 2 +- tests/xfs/009 | 2 +- tests/xfs/017 | 3 +-- tests/xfs/019 | 3 +-- tests/xfs/021 | 3 +-- tests/xfs/022 | 2 +- tests/xfs/023 | 2 +- tests/xfs/024 | 2 +- tests/xfs/025 | 2 +- tests/xfs/026 | 2 +- tests/xfs/027 | 2 +- tests/xfs/028 | 2 +- tests/xfs/030 | 2 +- tests/xfs/034 | 3 +-- tests/xfs/035 | 2 +- tests/xfs/036 | 2 +- tests/xfs/037 | 2 +- tests/xfs/038 | 2 +- tests/xfs/039 | 2 +- tests/xfs/041 | 2 +- tests/xfs/042 | 2 +- tests/xfs/043 | 2 +- tests/xfs/044 | 2 +- tests/xfs/045 | 2 +- tests/xfs/046 | 2 +- tests/xfs/047 | 2 +- tests/xfs/055 | 2 +- tests/xfs/056 | 2 +- tests/xfs/059 | 2 +- tests/xfs/060 | 2 +- tests/xfs/061 | 2 +- tests/xfs/063 | 2 +- tests/xfs/064 | 2 +- tests/xfs/066 | 2 +- tests/xfs/068 | 2 +- tests/xfs/070 | 1 - tests/xfs/072 | 2 +- tests/xfs/077 | 2 +- tests/xfs/090 | 2 +- tests/xfs/094 | 2 +- tests/xfs/103 | 2 +- tests/xfs/121 | 3 +-- tests/xfs/153 | 2 +- tests/xfs/168 | 4 ++-- tests/xfs/178 | 6 ++---- tests/xfs/181 | 3 +-- tests/xfs/183 | 3 +-- tests/xfs/202 | 3 +-- tests/xfs/244 | 4 ++-- tests/xfs/266 | 2 +- tests/xfs/267 | 2 +- tests/xfs/268 | 2 +- tests/xfs/281 | 2 +- tests/xfs/282 | 2 +- tests/xfs/283 | 2 +- tests/xfs/287 | 3 +-- tests/xfs/296 | 2 +- tests/xfs/300 | 3 +-- tests/xfs/301 | 2 +- tests/xfs/302 | 2 +- tests/xfs/306 | 3 +-- tests/xfs/445 | 3 +-- tests/xfs/448 | 1 - tests/xfs/520 | 2 +- tests/xfs/596 | 1 - 73 files changed, 95 insertions(+), 106 deletions(-)
common/attr +2 -2
@@ -237,8 +237,8 @@ _require_attr_v1() # check if we support the noattr2 mount option _require_noattr2() { - _scratch_mkfs_xfs > /dev/null 2>&1 \ - || _fail "_scratch_mkfs_xfs failed on $SCRATCH_DEV" + _try_scratch_mkfs_xfs > /dev/null 2>&1 \ + || _fail "_try_scratch_mkfs_xfs failed on $SCRATCH_DEV" _try_scratch_mount -o noattr2 > /dev/null 2>&1 \ || _notrun "noattr2 mount option not supported on $SCRATCH_DEV" _scratch_unmount
common/filestreams +1 -1
@@ -96,7 +96,7 @@ _test_streams() { unset SCRATCH_RTDEV local size=`expr $agsize \* 1024 \* 1024 \* $agcount` - _scratch_mkfs_xfs -dsize=$size,agcount=$agcount >/dev/null 2>&1 \ + _try_scratch_mkfs_xfs -dsize=$size,agcount=$agcount >/dev/null 2>&1 \ || _fail "mkfs failed" if [ "$use_iflag" = "0" ]; then
common/log +2 -2
@@ -336,7 +336,7 @@ _mkfs_log() # mkfs options to append to log size otion can be specified ($*) export MKFS_OPTIONS="-l size=2000b -l lazy-count=1 $*" _full "mkfs" - _scratch_mkfs_xfs >>$seqres.full 2>&1 + _try_scratch_mkfs_xfs >>$seqres.full 2>&1 if [ $? -ne 0 ] ; then _echofull "Cannot mkfs for this test using option specified: $MKFS_OPTIONS" return 1
@@ -496,7 +496,7 @@ _require_v2log() { # test out mkfs to see if it supports "-l version=2" export MKFS_OPTIONS="-l version=2" - if ! _scratch_mkfs_xfs >>$seqres.full 2>&1; then + if ! _try_scratch_mkfs_xfs >>$seqres.full 2>&1; then _notrun "mkfs does not support v2 logs" fi
common/rc +5 -4
@@ -784,7 +784,7 @@ _scratch_mkfs() return $? ;; xfs) - _scratch_mkfs_xfs $* + _try_scratch_mkfs_xfs $* return $? ;; udf)
@@ -1090,9 +1090,10 @@ _try_scratch_mkfs_sized() # don't override MKFS_OPTIONS that set a block size. echo $MKFS_OPTIONS |grep -E -q "b\s*size=" if [ $? -eq 0 ]; then - _scratch_mkfs_xfs -d size=$fssize $rt_ops + _try_scratch_mkfs_xfs -d size=$fssize $rt_ops else - _scratch_mkfs_xfs -d size=$fssize $rt_ops -b size=$blocksize + _try_scratch_mkfs_xfs -d size=$fssize $rt_ops \ + -b size=$blocksize fi ;; ext2|ext3|ext4)
@@ -1234,7 +1235,7 @@ _scratch_mkfs_blocksized() _scratch_mkfs --sectorsize=$blocksize ;; xfs) - _scratch_mkfs_xfs $MKFS_OPTIONS -b size=$blocksize + _try_scratch_mkfs_xfs $MKFS_OPTIONS -b size=$blocksize ;; ext2|ext3|ext4) _scratch_mkfs_ext4 $MKFS_OPTIONS -b $blocksize
common/xfs +17 -11
@@ -146,7 +146,7 @@ _scratch_find_xfs_min_logblocks() rm -f $tmp.mkfsstd $tmp.mkfserr } -_scratch_mkfs_xfs() +_try_scratch_mkfs_xfs() { local mkfs_cmd="`_scratch_mkfs_xfs_opts`" local mkfs_filter="sed -e '/less than device physical sector/d' \
@@ -180,6 +180,11 @@ _scratch_mkfs_xfs() return $mkfs_status } +_scratch_mkfs_xfs() +{ + _try_scratch_mkfs_xfs $* || _notrun "_scratch_mkfs_xfs failed with ($*)" +} + # Get the number of realtime extents of a mounted filesystem. _xfs_get_rtextents() {
@@ -497,7 +502,7 @@ _require_xfs_has_feature() # _require_scratch_xfs_crc() { - _scratch_mkfs_xfs >/dev/null 2>&1 + _try_scratch_mkfs_xfs >/dev/null 2>&1 _try_scratch_mount >/dev/null 2>&1 \ || _notrun "Kernel doesn't support crc feature" _require_xfs_has_feature $SCRATCH_MNT crc -u \
@@ -517,7 +522,7 @@ _require_xfs_mkfs_finobt() # _require_xfs_finobt() { - _scratch_mkfs_xfs -m crc=1,finobt=1 >/dev/null 2>&1 + _try_scratch_mkfs_xfs -m crc=1,finobt=1 >/dev/null 2>&1 _try_scratch_mount >/dev/null 2>&1 \ || _notrun "Kernel doesn't support finobt feature" _scratch_unmount
@@ -545,7 +550,7 @@ _require_xfs_sparse_inodes() { _scratch_mkfs_xfs_supported -m crc=1 -i sparse > /dev/null 2>&1 \ || _notrun "mkfs.xfs does not support sparse inodes" - _scratch_mkfs_xfs -m crc=1 -i sparse > /dev/null 2>&1 + _try_scratch_mkfs_xfs -m crc=1 -i sparse > /dev/null 2>&1 _try_scratch_mount >/dev/null 2>&1 \ || _notrun "kernel does not support sparse inodes" _scratch_unmount
@@ -557,7 +562,7 @@ _require_xfs_nrext64() { _scratch_mkfs_xfs_supported -m crc=1 -i nrext64 > /dev/null 2>&1 \ || _notrun "mkfs.xfs does not support nrext64" - _scratch_mkfs_xfs -m crc=1 -i nrext64 > /dev/null 2>&1 + _try_scratch_mkfs_xfs -m crc=1 -i nrext64 > /dev/null 2>&1 _try_scratch_mount >/dev/null 2>&1 \ || _notrun "kernel does not support nrext64" _scratch_unmount
@@ -572,7 +577,7 @@ _require_xfs_db_command() fi command=$1 - _scratch_mkfs_xfs >/dev/null 2>&1 + _try_scratch_mkfs_xfs >/dev/null 2>&1 _scratch_xfs_db -x -c "help" | grep $command > /dev/null || \ _notrun "xfs_db $command support is missing" }
@@ -1216,7 +1221,7 @@ _require_scratch_xfs_shrink() _require_scratch _require_command "$XFS_GROWFS_PROG" xfs_growfs - _scratch_mkfs_xfs | _filter_mkfs 2>$tmp.mkfs >/dev/null + _try_scratch_mkfs_xfs | _filter_mkfs 2>$tmp.mkfs >/dev/null . $tmp.mkfs _scratch_mount # here just to check if kernel supports, no need do more extra work
@@ -1512,7 +1517,7 @@ _try_wipe_scratch_xfs() # Try to wipe each SB by default mkfs.xfs geometry local tmp=`mktemp -u` unset agcount agsize dbsize - _scratch_mkfs_xfs -N 2>/dev/null | perl -ne ' + _try_scratch_mkfs_xfs -N 2>/dev/null | perl -ne ' if (/^meta-data=.*\s+agcount=(\d+), agsize=(\d+) blks/) { print STDOUT "agcount=$1\nagsize=$2\n"; }
@@ -1745,7 +1750,8 @@ _scratch_xfs_create_fake_root() # A large stripe unit will put the root inode out quite far # due to alignment, leaving free blocks ahead of it. - _scratch_mkfs_xfs -d sunit=1024,swidth=1024 > $seqres.full 2>&1 || _fail "mkfs failed" + _try_scratch_mkfs_xfs -d sunit=1024,swidth=1024 > $seqres.full 2>&1 || \ + _fail "mkfs failed" # Mounting /without/ a stripe should allow inodes to be allocated # in lower free blocks, without the stripe alignment.
@@ -1841,7 +1847,7 @@ _xfs_discard_max_offset_kb() # check if mkfs and the kernel support nocrc (v4) file systems _require_xfs_nocrc() { - _scratch_mkfs_xfs -m crc=0 > /dev/null 2>&1 || \ + _try_scratch_mkfs_xfs -m crc=0 > /dev/null 2>&1 || \ _notrun "v4 file systems not supported" _try_scratch_mount > /dev/null 2>&1 || \ _notrun "v4 file systems not supported"
@@ -1870,7 +1876,7 @@ _require_xfs_parent() { _scratch_mkfs_xfs_supported -n parent > /dev/null 2>&1 \ || _notrun "mkfs.xfs does not support parent pointers" - _scratch_mkfs_xfs -n parent > /dev/null 2>&1 + _try_scratch_mkfs_xfs -n parent > /dev/null 2>&1 _try_scratch_mount >/dev/null 2>&1 \ || _notrun "kernel does not support parent pointers" _scratch_unmount
tests/generic/083 +1 -2
@@ -45,8 +45,7 @@ workout() echo "" >>$seqres.full if [ $FSTYP = xfs ] then - _scratch_mkfs_xfs -dsize=$fsz,agcount=$ags >>$seqres.full 2>&1 \ - || _fail "size=$fsz,agcount=$ags mkfs failed" + _scratch_mkfs_xfs -dsize=$fsz,agcount=$ags >>$seqres.full 2>&1 else _scratch_mkfs_sized $fsz >>$seqres.full 2>&1 fi
tests/xfs/002 +1 -1
@@ -24,7 +24,7 @@ _require_scratch_nocheck _require_no_large_scratch_dev _require_xfs_nocrc -_scratch_mkfs_xfs -m crc=0 -d size=128m >> $seqres.full 2>&1 || _fail "mkfs failed" +_scratch_mkfs_xfs -m crc=0 -d size=128m >> $seqres.full 2>&1 # Scribble past a couple V4 secondary superblocks to populate sb_crc # (We can't write to the structure member because it doesn't exist
tests/xfs/004 +1 -1
@@ -21,7 +21,7 @@ _cleanup() _populate_scratch() { echo "=== mkfs output ===" >>$seqres.full - _scratch_mkfs_xfs | tee -a $seqres.full | _filter_mkfs 2>$tmp.mkfs + _try_scratch_mkfs_xfs | tee -a $seqres.full | _filter_mkfs 2>$tmp.mkfs . $tmp.mkfs _scratch_mount # This test looks at specific behaviors of the xfs_db freesp command,
tests/xfs/005 +1 -1
@@ -20,7 +20,7 @@ _begin_fstest auto quick _require_scratch_nocheck -_scratch_mkfs_xfs -m crc=1 >> $seqres.full 2>&1 || _fail "mkfs failed" +_scratch_mkfs_xfs -m crc=1 >> $seqres.full 2>&1 # Zap the crc. xfs_db updates the CRC post-write, so poke it directly $XFS_IO_PROG -c "pwrite 224 4" -c fsync $SCRATCH_DEV | _filter_xfs_io
tests/xfs/009 +1 -1
@@ -19,7 +19,7 @@ _cleanup() _init() { echo "*** mkfs" - if ! _scratch_mkfs_xfs >$tmp.out 2>&1 + if ! _try_scratch_mkfs_xfs >$tmp.out 2>&1 then cat $tmp.out echo "failed to mkfs $SCRATCH_DEV"
tests/xfs/017 +1 -2
@@ -33,8 +33,7 @@ echo "*** init FS" _scratch_unmount >/dev/null 2>&1 echo "*** MKFS ***" >>$seqres.full echo "" >>$seqres.full -_scratch_mkfs_xfs >>$seqres.full 2>&1 \ - || _fail "mkfs failed" +_scratch_mkfs_xfs >>$seqres.full 2>&1 _scratch_mount echo "*** test"
tests/xfs/019 +1 -2
@@ -99,8 +99,7 @@ _verify_fs() _scratch_unmount >/dev/null 2>&1 _full "mkfs" - _scratch_mkfs_xfs $VERSION -p $protofile >>$seqfull 2>&1 \ - || _fail "mkfs failed" + _scratch_mkfs_xfs $VERSION -p $protofile >>$seqfull 2>&1 echo "*** check FS" _check_scratch_fs
tests/xfs/021 +1 -2
@@ -59,8 +59,7 @@ _require_attrs _scratch_unmount >/dev/null 2>&1 echo "*** mkfs" -_scratch_mkfs_xfs >/dev/null \ - || _fail "mkfs failed" +_scratch_mkfs_xfs >/dev/null echo "*** mount FS" _scratch_mount
tests/xfs/022 +1 -1
@@ -28,7 +28,7 @@ _cleanup() _require_tape $TAPE_DEV _require_scratch -_scratch_mkfs_xfs >>$seqres.full || _fail "mkfs failed" +_scratch_mkfs_xfs >>$seqres.full _scratch_mount # note: fsstress uses an endian dependent random number generator, running this
tests/xfs/023 +1 -1
@@ -27,7 +27,7 @@ _cleanup() _require_tape $TAPE_DEV _require_scratch -_scratch_mkfs_xfs >>$seqres.full || _fail "mkfs failed" +_scratch_mkfs_xfs >>$seqres.full _scratch_mount _create_dumpdir_fill _erase_hard
tests/xfs/024 +1 -1
@@ -25,7 +25,7 @@ _cleanup() _require_tape $TAPE_DEV _require_scratch -_scratch_mkfs_xfs >>$seqres.full || _fail "mkfs failed" +_scratch_mkfs_xfs >>$seqres.full _scratch_mount _create_dumpdir_fill # ensure file/dir timestamps precede dump timestamp
tests/xfs/025 +1 -1
@@ -25,7 +25,7 @@ _cleanup() _require_tape $TAPE_DEV _require_scratch -_scratch_mkfs_xfs >>$seqres.full || _fail "mkfs failed" +_scratch_mkfs_xfs >>$seqres.full _scratch_mount _create_dumpdir_fill _erase_hard
tests/xfs/026 +1 -1
@@ -23,7 +23,7 @@ _cleanup() . ./common/dump _require_scratch -_scratch_mkfs_xfs >>$seqres.full || _fail "mkfs failed" +_scratch_mkfs_xfs >>$seqres.full _scratch_mount _create_dumpdir_fill
tests/xfs/027 +1 -1
@@ -23,7 +23,7 @@ _cleanup() . ./common/dump _require_scratch -_scratch_mkfs_xfs >>$seqres.full || _fail "mkfs failed" +_scratch_mkfs_xfs >>$seqres.full _scratch_mount _create_dumpdir_fill
tests/xfs/028 +1 -1
@@ -23,7 +23,7 @@ _cleanup() . ./common/dump _require_scratch -_scratch_mkfs_xfs >>$seqres.full || _fail "mkfs failed" +_scratch_mkfs_xfs >>$seqres.full _scratch_mount #
tests/xfs/030 +1 -1
@@ -56,7 +56,7 @@ DSIZE="-dsize=100m,agcount=6" # superblock (hanging around from earlier tests)... # -_scratch_mkfs_xfs $DSIZE >/dev/null 2>&1 +_try_scratch_mkfs_xfs $DSIZE >/dev/null 2>&1 if [ $? -ne 0 ] # probably don't have a big enough scratch then _notrun "SCRATCH_DEV too small, results would be non-deterministic"
tests/xfs/034 +1 -2
@@ -29,8 +29,7 @@ echo "*** init FS" _scratch_unmount >/dev/null 2>&1 echo "*** MKFS ***" >>$seqres.full echo "" >>$seqres.full -_scratch_mkfs_xfs >>$seqres.full 2>&1 \ - || _fail "mkfs failed" +_scratch_mkfs_xfs >>$seqres.full _scratch_mount echo "*** test"
tests/xfs/035 +1 -1
@@ -24,7 +24,7 @@ _cleanup() _require_tape $TAPE_DEV _require_scratch -_scratch_mkfs_xfs >>$seqres.full || _fail "mkfs failed" +_scratch_mkfs_xfs >>$seqres.full _scratch_mount _create_dumpdir_fill _erase_hard
tests/xfs/036 +1 -1
@@ -24,7 +24,7 @@ _cleanup() _require_tape $RMT_IRIXTAPE_DEV _require_scratch -_scratch_mkfs_xfs >>$seqres.full || _fail "mkfs failed" +_scratch_mkfs_xfs >>$seqres.full _scratch_mount _create_dumpdir_fill _erase_soft
tests/xfs/037 +1 -1
@@ -23,7 +23,7 @@ _cleanup() _require_tape $RMT_TAPE_DEV _require_scratch -_scratch_mkfs_xfs >>$seqres.full || _fail "mkfs failed" +_scratch_mkfs_xfs >>$seqres.full _scratch_mount _create_dumpdir_fill _erase_soft
tests/xfs/038 +1 -1
@@ -23,7 +23,7 @@ _cleanup() _require_tape $RMT_TAPE_DEV _require_scratch -_scratch_mkfs_xfs >>$seqres.full || _fail "mkfs failed" +_scratch_mkfs_xfs >>$seqres.full _scratch_mount _create_dumpdir_fill _erase_hard
tests/xfs/039 +1 -1
@@ -24,7 +24,7 @@ _cleanup() _require_tape $RMT_IRIXTAPE_DEV _require_scratch -_scratch_mkfs_xfs >>$seqres.full || _fail "mkfs failed" +_scratch_mkfs_xfs >>$seqres.full _scratch_mount _create_dumpdir_fill _erase_soft
tests/xfs/041 +1 -1
@@ -38,7 +38,7 @@ _fill() _do_die_on_error=message_only agsize=32 echo -n "Make $agsize megabyte filesystem on SCRATCH_DEV and mount... " -_scratch_mkfs_xfs -dsize=${agsize}m,agcount=1 2>&1 >/dev/null || _fail "mkfs failed" +_scratch_mkfs_xfs -dsize=${agsize}m,agcount=1 2>&1 >/dev/null bsize=`_scratch_mkfs_xfs -dsize=${agsize}m,agcount=1 2>&1 | _filter_mkfs 2>&1 \ | perl -ne 'if (/dbsize=(\d+)/) {print $1;}'` onemeginblocks=`expr 1048576 / $bsize`
tests/xfs/042 +1 -1
@@ -50,7 +50,7 @@ _require_scratch _do_die_on_error=message_only echo -n "Make a 96 megabyte filesystem on SCRATCH_DEV and mount... " -_scratch_mkfs_xfs -dsize=96m,agcount=3 2>&1 >/dev/null || _fail "mkfs failed" +_scratch_mkfs_xfs -dsize=96m,agcount=3 2>&1 >/dev/null _scratch_mount echo "done"
tests/xfs/043 +1 -1
@@ -26,7 +26,7 @@ _cleanup() _require_tape $TAPE_DEV _require_scratch -_scratch_mkfs_xfs >>$seqres.full || _fail "mkfs failed" +_scratch_mkfs_xfs >>$seqres.full _scratch_mount _create_dumpdir_fill _erase_hard
tests/xfs/044 +1 -1
@@ -73,7 +73,7 @@ echo "*** mkfs" # this test only works for version 1 logs currently lversion=1 lsize=16777216 -_scratch_mkfs_xfs -lsize=$lsize,version=$lversion >$tmp.mkfs0 2>&1 +_try_scratch_mkfs_xfs -lsize=$lsize,version=$lversion >$tmp.mkfs0 2>&1 [ $? -ne 0 ] && \ _notrun "Cannot mkfs for this test using MKFS_OPTIONS specified" _filter_mkfs <$tmp.mkfs0 2>$tmp.mkfs1
tests/xfs/045 +1 -1
@@ -25,7 +25,7 @@ echo "*** get uuid" uuid=`_get_existing_uuid` echo "*** mkfs" -if ! _scratch_mkfs_xfs >$tmp.out 2>&1 +if ! _try_scratch_mkfs_xfs >$tmp.out 2>&1 then cat $tmp.out echo "!!! failed to mkfs on $SCRATCH_DEV"
tests/xfs/046 +1 -1
@@ -21,7 +21,7 @@ _cleanup() . ./common/dump _require_scratch -_scratch_mkfs_xfs >>$seqres.full || _fail "mkfs failed" +_scratch_mkfs_xfs >>$seqres.full _scratch_mount _create_dumpdir_symlinks
tests/xfs/047 +1 -1
@@ -21,7 +21,7 @@ _cleanup() . ./common/dump _require_scratch -_scratch_mkfs_xfs >>$seqres.full || _fail "mkfs failed" +_scratch_mkfs_xfs >>$seqres.full _scratch_mount #
tests/xfs/055 +1 -1
@@ -24,7 +24,7 @@ _cleanup() _require_tape $RMT_TAPE_USER@$RMT_IRIXTAPE_DEV _require_scratch -_scratch_mkfs_xfs >>$seqres.full || _fail "mkfs failed" +_scratch_mkfs_xfs >>$seqres.full _scratch_mount _create_dumpdir_fill
tests/xfs/056 +1 -1
@@ -24,7 +24,7 @@ _cleanup() . ./common/dump _require_scratch -_scratch_mkfs_xfs >>$seqres.full || _fail "mkfs failed" +_scratch_mkfs_xfs >>$seqres.full _scratch_mount _create_dumpdir_fill_perm
tests/xfs/059 +1 -1
@@ -25,7 +25,7 @@ _cleanup() _require_multi_stream _require_scratch -_scratch_mkfs_xfs >>$seqres.full || _fail "mkfs failed" +_scratch_mkfs_xfs >>$seqres.full _scratch_mount _create_dumpdir_fill_multi
tests/xfs/060 +1 -1
@@ -25,7 +25,7 @@ _cleanup() _require_multi_stream _require_scratch -_scratch_mkfs_xfs >>$seqres.full || _fail "mkfs failed" +_scratch_mkfs_xfs >>$seqres.full _scratch_mount _create_dumpdir_fill_multi
tests/xfs/061 +1 -1
@@ -23,7 +23,7 @@ _cleanup() . ./common/dump _require_scratch -_scratch_mkfs_xfs >>$seqres.full || _fail "mkfs failed" +_scratch_mkfs_xfs >>$seqres.full _scratch_mount # src/dumpfile based on dumping from
tests/xfs/063 +1 -1
@@ -25,7 +25,7 @@ _cleanup() _require_attrs trusted user _require_scratch -_scratch_mkfs_xfs >>$seqres.full || _fail "mkfs failed" +_scratch_mkfs_xfs >>$seqres.full _scratch_mount # create files with EAs
tests/xfs/064 +1 -1
@@ -35,7 +35,7 @@ _ls_size_filter() } _require_scratch -_scratch_mkfs_xfs >>$seqres.full || _fail "mkfs failed" +_scratch_mkfs_xfs >>$seqres.full _scratch_mount _create_dumpdir_hardlinks 9
tests/xfs/066 +1 -1
@@ -36,7 +36,7 @@ else _notrun "Installed libc doesn't correctly handle setrlimit/ftruncate64" fi -_scratch_mkfs_xfs >>$seqres.full || _fail "mkfs failed" +_scratch_mkfs_xfs >>$seqres.full _scratch_mount _create_dumpdir_largefile echo "ls dumpdir/largefile"
tests/xfs/068 +1 -1
@@ -27,7 +27,7 @@ _cleanup() . ./common/dump _require_scratch -_scratch_mkfs_xfs >>$seqres.full || _fail "mkfs failed" +_scratch_mkfs_xfs >>$seqres.full _scratch_mount _create_dumpdir_stress_num 4096
tests/xfs/070 +0 -1
@@ -75,7 +75,6 @@ _require_scratch_nocheck _require_command "$KILLALL_PROG" killall _scratch_mkfs | _filter_mkfs > /dev/null 2> $tmp.mkfs -test "${PIPESTATUS[0]}" -eq 0 || _fail "mkfs failed" . $tmp.mkfs # import agcount
tests/xfs/072 +1 -1
@@ -26,7 +26,7 @@ _require_xfs_io_command "falloc" _scratch_unmount >/dev/null 2>&1 -_scratch_mkfs_xfs >/dev/null || _fail "mkfs failed" +_scratch_mkfs_xfs >/dev/null _scratch_mount # check there's enough freespace on $SCRATCH_MNT ... (1GiB + 1MiB)
tests/xfs/077 +1 -1
@@ -48,7 +48,7 @@ _fs_has_META_UUID() $XFS_DB_PROG -r -c version $FS | grep -q META_UUID } -_scratch_mkfs_xfs -m crc=1 >> $seqres.full 2>&1 || _fail "mkfs failed" +_scratch_mkfs_xfs -m crc=1 >> $seqres.full 2>&1 ORIG_UUID=`_scratch_xfs_db -c "uuid" | awk '{print $NF}'`
tests/xfs/090 +1 -1
@@ -23,7 +23,7 @@ _filter_io() _create_scratch() { echo "*** mkfs" - if ! _scratch_mkfs_xfs >$tmp.out 2>&1 + if ! _try_scratch_mkfs_xfs >$tmp.out 2>&1 then cat $tmp.out echo "failed to mkfs $SCRATCH_DEV"
tests/xfs/094 +1 -1
@@ -38,7 +38,7 @@ _filter_rtinherit_flag() _create_scratch() { echo "*** mkfs" - if ! _scratch_mkfs_xfs >$tmp.out 2>&1 + if ! _try_scratch_mkfs_xfs >$tmp.out 2>&1 then cat $tmp.out echo "failed to mkfs $SCRATCH_DEV"
tests/xfs/103 +1 -1
@@ -15,7 +15,7 @@ _begin_fstest metadata dir ioctl auto quick _create_scratch() { echo "*** mkfs" - if ! _scratch_mkfs_xfs >$tmp.out 2>&1 + if ! _try_scratch_mkfs_xfs >$tmp.out 2>&1 then cat $tmp.out echo "failed to mkfs $SCRATCH_DEV"
tests/xfs/121 +1 -2
@@ -23,8 +23,7 @@ rm -f $tmp.log _require_scratch echo "mkfs" -_scratch_mkfs_xfs >>$seqres.full 2>&1 \ - || _fail "mkfs scratch failed" +_scratch_mkfs_xfs >>$seqres.full 2>&1 echo "mount" _scratch_mount
tests/xfs/153 +1 -1
@@ -68,7 +68,7 @@ _filter_and_check_blks() run_tests() { - _scratch_mkfs_xfs | _filter_mkfs 2>$tmp.mkfs + _try_scratch_mkfs_xfs | _filter_mkfs 2>$tmp.mkfs cat $tmp.mkfs >>$seqres.full # keep the blocksize and data size for dd later
tests/xfs/168 +2 -2
@@ -18,7 +18,7 @@ _begin_fstest auto growfs shrinkfs ioctl prealloc stress create_scratch() { - _scratch_mkfs_xfs $@ | tee -a $seqres.full | \ + _try_scratch_mkfs_xfs $@ | tee -a $seqres.full | \ _filter_mkfs 2>$tmp.mkfs >/dev/null . $tmp.mkfs
@@ -46,7 +46,7 @@ stress_scratch() _require_scratch_xfs_shrink _require_xfs_io_command "falloc" -_scratch_mkfs_xfs | tee -a $seqres.full | _filter_mkfs 2>$tmp.mkfs >/dev/null +_try_scratch_mkfs_xfs | tee -a $seqres.full | _filter_mkfs 2>$tmp.mkfs >/dev/null . $tmp.mkfs # extract blocksize and data size for scratch device endsize=`expr 125 \* 1048576` # stop after shrinking this big
tests/xfs/178 +2 -4
@@ -51,7 +51,6 @@ _dd_repair_check() _require_scratch _scratch_mkfs_xfs | _filter_mkfs 2>$tmp.mkfs -test "${PIPESTATUS[0]}" -eq 0 || _fail "mkfs failed!" # By executing the followint tmp file, will get on the mkfs options stored in # variables
@@ -60,7 +59,7 @@ test "${PIPESTATUS[0]}" -eq 0 || _fail "mkfs failed!" # if the default agcount is too small, bump it up and re-mkfs before testing if [ $agcount -lt 8 ]; then agcount=8 - _scratch_mkfs_xfs -dagcount=$agcount >/dev/null 2>&1 \ + _try_scratch_mkfs_xfs -dagcount=$agcount >/dev/null 2>&1 \ || _notrun "Test requires at least 8 AGs." fi
@@ -68,8 +67,7 @@ _dd_repair_check $SCRATCH_DEV $sectsz # smaller AGCOUNT let "agcount=$agcount-2" -_scratch_mkfs_xfs -dagcount=$agcount >/dev/null 2>&1 \ - || _fail "mkfs failed!" +_scratch_mkfs_xfs -dagcount=$agcount >/dev/null 2>&1 _dd_repair_check $SCRATCH_DEV $sectsz
tests/xfs/181 +1 -2
@@ -32,8 +32,7 @@ rm -f $tmp.log _require_scratch echo "mkfs" -_scratch_mkfs_xfs >>$seqres.full 2>&1 \ - || _fail "mkfs scratch failed" +_scratch_mkfs_xfs >>$seqres.full 2>&1 echo "mount" _scratch_mount
tests/xfs/183 +1 -2
@@ -18,8 +18,7 @@ _begin_fstest rw other auto quick # Setup Filesystem _require_scratch -_scratch_mkfs_xfs >/dev/null 2>&1 \ - || _fail "mkfs failed" +_scratch_mkfs_xfs >/dev/null 2>&1 _scratch_mount
tests/xfs/202 +1 -2
@@ -24,8 +24,7 @@ _require_scratch_nocheck # a single AG filesystem. # echo "== Creating single-AG filesystem ==" -_scratch_mkfs_xfs -d agcount=1 -d size=$((1024*1024*1024)) >/dev/null 2>&1 \ - || _fail "!!! failed to make filesystem with single AG" +_scratch_mkfs_xfs -d agcount=1 -d size=$((1024*1024*1024)) >/dev/null 2>&1 echo "== Trying to repair it (should fail) ==" _scratch_xfs_repair
tests/xfs/244 +2 -2
@@ -29,7 +29,7 @@ _require_projid16bit export MOUNT_OPTIONS="-opquota" # make fs with no projid32bit -_scratch_mkfs_xfs -i projid32bit=0 >> $seqres.full || _fail "mkfs failed" +_scratch_mkfs_xfs -i projid32bit=0 >> $seqres.full _qmount # make sure project quota is supported _require_prjquota ${SCRATCH_DEV}
@@ -73,7 +73,7 @@ fi # Do testing on filesystem with projid32bit feature enabled _scratch_unmount 2>/dev/null -_scratch_mkfs_xfs -i projid32bit=1 >> $seqres.full || _fail "mkfs failed" +_scratch_mkfs_xfs -i projid32bit=1 >> $seqres.full _qmount mkdir $dir
tests/xfs/266 +1 -1
@@ -55,7 +55,7 @@ if [ $? -ne 0 ]; then _notrun "requires xfsdump -D" fi -_scratch_mkfs_xfs >>$seqres.full || _fail "mkfs failed" +_scratch_mkfs_xfs >>$seqres.full _scratch_mount _create_dumpdir_fill # ensure file/dir timestamps precede dump timestamp
tests/xfs/267 +1 -1
@@ -46,7 +46,7 @@ End-of-File _require_tape $TAPE_DEV _require_attrs trusted _require_scratch -_scratch_mkfs_xfs >>$seqres.full || _fail "mkfs failed" +_scratch_mkfs_xfs >>$seqres.full _scratch_mount _create_files
tests/xfs/268 +1 -1
@@ -49,7 +49,7 @@ End-of-File _require_tape $TAPE_DEV _require_attrs trusted user _require_scratch -_scratch_mkfs_xfs >>$seqres.full || _fail "mkfs failed" +_scratch_mkfs_xfs >>$seqres.full _scratch_mount _create_files
tests/xfs/281 +1 -1
@@ -22,7 +22,7 @@ _cleanup() _require_legacy_v2_format _require_scratch -_scratch_mkfs_xfs >>$seqres.full || _fail "mkfs failed" +_scratch_mkfs_xfs >>$seqres.full _scratch_mount _create_dumpdir_fill
tests/xfs/282 +1 -1
@@ -24,7 +24,7 @@ _cleanup() _require_legacy_v2_format _require_scratch -_scratch_mkfs_xfs >>$seqres.full || _fail "mkfs failed" +_scratch_mkfs_xfs >>$seqres.full _scratch_mount _create_dumpdir_fill
tests/xfs/283 +1 -1
@@ -24,7 +24,7 @@ _cleanup() _require_legacy_v2_format _require_scratch -_scratch_mkfs_xfs >>$seqres.full || _fail "mkfs failed" +_scratch_mkfs_xfs >>$seqres.full _scratch_mount _create_dumpdir_fill
tests/xfs/287 +1 -2
@@ -35,8 +35,7 @@ _require_projid32bit _require_projid16bit # create xfs fs without projid32bit ability, will be gained by xfs_admin -_scratch_mkfs_xfs -i projid32bit=0 -d size=200m >> $seqres.full \ - || _fail "mkfs failed" +_scratch_mkfs_xfs -i projid32bit=0 -d size=200m >> $seqres.full _qmount_option "pquota" _qmount # require project quotas
tests/xfs/296 +1 -1
@@ -26,7 +26,7 @@ _cleanup() _require_scratch _require_command "$SETCAP_PROG" setcap _require_command "$GETCAP_PROG" getcap -_scratch_mkfs_xfs >>$seqres.full || _fail "mkfs failed" +_scratch_mkfs_xfs >>$seqres.full _scratch_mount mkdir -p $dump_dir
tests/xfs/300 +1 -2
@@ -20,8 +20,7 @@ _require_xfs_nocrc getenforce | grep -q "Enforcing\|Permissive" || _notrun "SELinux not enabled" [ "$XFS_FSR_PROG" = "" ] && _notrun "xfs_fsr not found" -_scratch_mkfs_xfs -m crc=0 -i size=256 >> $seqres.full 2>&1 \ - || _fail "mkfs failed" +_scratch_mkfs_xfs -m crc=0 -i size=256 >> $seqres.full 2>&1 # Manually mount to avoid fs-wide context set by default in xfstests mount $SCRATCH_DEV $SCRATCH_MNT
tests/xfs/301 +1 -1
@@ -25,7 +25,7 @@ _cleanup() # Modify as appropriate. _require_scratch -_scratch_mkfs_xfs >>$seqres.full || _fail "mkfs failed" +_scratch_mkfs_xfs >>$seqres.full _scratch_mount # Extended attributes
tests/xfs/302 +1 -1
@@ -24,7 +24,7 @@ _cleanup() # Modify as appropriate. _require_scratch -_scratch_mkfs_xfs >>$seqres.full || _fail "mkfs failed" +_scratch_mkfs_xfs >>$seqres.full _scratch_mount echo "Silence is golden."
tests/xfs/306 +1 -2
@@ -30,8 +30,7 @@ unset SCRATCH_RTDEV # Create a small fs with a large directory block size. We want to fill up the fs # quickly and then create multi-fsb dirblocks over fragmented free space. -_scratch_mkfs_xfs -d size=100m -n size=64k >> $seqres.full 2>&1 || \ - _notrun 'could not format tiny scratch fs' +_scratch_mkfs_xfs -d size=100m -n size=64k >> $seqres.full 2>&1 _scratch_mount # Fill a source directory with many largish-named files. 1k uuid-named entries
tests/xfs/445 +1 -2
@@ -45,8 +45,7 @@ _check_filestreams_support || _notrun "filestreams not available" unset SCRATCH_RTDEV # use small AGs for frequent stream switching -_scratch_mkfs_xfs -d agsize=20m,size=2g >> $seqres.full 2>&1 || - _fail "mkfs failed" +_scratch_mkfs_xfs -d agsize=20m,size=2g >> $seqres.full 2>&1 _scratch_mount "-o filestreams" # start background inode reclaim
tests/xfs/448 +0 -1
@@ -33,7 +33,6 @@ rm -f "$seqres.full" # Format and mount _scratch_mkfs | _filter_mkfs > $seqres.full 2> $tmp.mkfs -test "${PIPESTATUS[0]}" -eq 0 || _fail "mkfs failed" _scratch_mount # Get directory block size
tests/xfs/520 +1 -1
@@ -34,7 +34,7 @@ _require_scratch_nocheck unset USE_EXTERNAL force_crafted_metadata() { - _scratch_mkfs_xfs -f $fsdsopt "$4" >> $seqres.full 2>&1 || _fail "mkfs failed" + _scratch_mkfs_xfs -f $fsdsopt "$4" >> $seqres.full 2>&1 _scratch_xfs_set_metadata_field "$1" "$2" "$3" >> $seqres.full 2>&1 local kmsg="xfs/$seq: testing $1=$2 at $(date +"%F %T")" local mounted=0
tests/xfs/596 +0 -1
@@ -39,7 +39,6 @@ _do_die_on_error=message_only rtsize=32 echo -n "Make $rtsize megabyte rt filesystem on SCRATCH_DEV and mount... " _scratch_mkfs_xfs -rsize=${rtsize}m | _filter_mkfs 2> "$tmp.mkfs" >> $seqres.full -test "${PIPESTATUS[0]}" -eq 0 || _fail "mkfs failed" . $tmp.mkfs onemeginblocks=`expr 1048576 / $dbsize`
Signature · 1 line
2.43.0
PATCH 3/4 xfs/432: use _scratch_mkfs_xfs
In reply to Christoph HellwigUse _scratch_mkfs_xfs instead of _scratch_mkfs to get _notrun handling for unsupported option combinations.
--- tests/xfs/432 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
tests/xfs/432 +1 -1
@@ -52,7 +52,7 @@ echo "Format and mount" # dablock. 33 dirblocks * 64k mean that we can expand a directory by # 2112k before we have to allocate another da btree block. -_scratch_mkfs -b size=1k -n size=64k > "$seqres.full" 2>&1 +_scratch_mkfs_xfs -b size=1k -n size=64k > "$seqres.full" 2>&1 _scratch_mount >> "$seqres.full" 2>&1 testdir="$SCRATCH_MNT/test-$seq"
Signature · 1 line
2.43.0
PATCH 4/4 xfs/516: use _scratch_mkfs_xfs
In reply to Christoph HellwigUse _scratch_mkfs_xfs instead of _scratch_mkfs to get _notrun handling for unsupported option combinations.
--- tests/xfs/516 | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
tests/xfs/516 +3 -3
@@ -72,7 +72,7 @@ __test_mount_opts() test_sunit_opts() { echo "Format with 4k stripe unit; 1x stripe width" >> $seqres.full - _scratch_mkfs -b size=4k -d sunit=8,swidth=8 >> $seqres.full 2>&1 + _scratch_mkfs_xfs -b size=4k -d sunit=8,swidth=8 >> $seqres.full 2>&1 __test_mount_opts "$@" }
@@ -82,7 +82,7 @@ test_su_opts() local mounted=0 echo "Format with 256k stripe unit; 4x stripe width" >> $seqres.full - _scratch_mkfs -b size=1k -d su=256k,sw=4 >> $seqres.full 2>&1 + _scratch_mkfs_xfs -b size=1k -d su=256k,sw=4 >> $seqres.full 2>&1 __test_mount_opts "$@" }
@@ -92,7 +92,7 @@ test_repair_detection() local mounted=0 echo "Format with 256k stripe unit; 4x stripe width" >> $seqres.full - _scratch_mkfs -b size=1k -d su=256k,sw=4 >> $seqres.full 2>&1 + _scratch_mkfs_xfs -b size=1k -d su=256k,sw=4 >> $seqres.full 2>&1 # Try to mount the fs with our test options. _try_scratch_mount >> $seqres.full 2>&1 && mounted=1
Signature · 1 line
2.43.0