# extra mkfs options can be added by tests
local extra_mkfs_options=$*
+ local tmp_dir=/tmp/
+
_scratch_options mkfs
- $MKFS_XFS_PROG $SCRATCH_OPTIONS $MKFS_OPTIONS $extra_mkfs_options $SCRATCH_DEV
+ # save mkfs output in case conflict means we need to run again.
+ # only the output for the mkfs that applies should be shown
+ $MKFS_XFS_PROG $SCRATCH_OPTIONS $MKFS_OPTIONS $extra_mkfs_options $SCRATCH_DEV \
+ 2>$tmp_dir.mkfserr 1>$tmp_dir.mkfsstd
local mkfs_status=$?
# a mkfs failure may be caused by conflicts between
>>$here/$seq.full
echo "** attempting to mkfs using only test $seq options: $extra_mkfs_options **" \
>>$here/$seq.full
- $MKFS_XFS_PROG $SCRATCH_OPTIONS $extra_mkfs_options $SCRATCH_DEV
+ # running mkfs again. overwrite previous mkfs output files
+ $MKFS_XFS_PROG $SCRATCH_OPTIONS $extra_mkfs_options $SCRATCH_DEV \
+ 2>$tmp_dir.mkfserr 1>$tmp_dir.mkfsstd
mkfs_status=$?
fi
+ # output stored mkfs output
+ cat $tmp_dir.mkfserr >&2
+ cat $tmp_dir.mkfsstd
+ rm -f $tmp_dir.mkfserr $tmp_dir.mkfsstd
+
if [ "$USE_BIG_LOOPFS" = yes ]; then
- [ -z "$RETAIN_AG_BYTES" ] && RETAIN_AG_BYTES=0
+ [ -z "$RETAIN_AG_BYTES" ] && RETAIN_AG_BYTES=0
./tools/ag-wipe -q -r $RETAIN_AG_BYTES $SCRATCH_DEV
fi