@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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,
@@ -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
@@ -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"
@@ -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"
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -23,7 +23,7 @@ _cleanup()
. ./common/dump
_require_scratch
-_scratch_mkfs_xfs >>$seqres.full || _fail "mkfs failed"
+_scratch_mkfs_xfs >>$seqres.full
_scratch_mount
#
@@ -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"
@@ -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"
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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`
@@ -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"
@@ -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
@@ -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
@@ -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"
@@ -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
@@ -21,7 +21,7 @@ _cleanup()
. ./common/dump
_require_scratch
-_scratch_mkfs_xfs >>$seqres.full || _fail "mkfs failed"
+_scratch_mkfs_xfs >>$seqres.full
_scratch_mount
#
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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"
@@ -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
@@ -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
@@ -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)
@@ -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}'`
@@ -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"
@@ -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"
@@ -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"
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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."
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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`