fsx: Small improvements and fixes

Move the run_fsx shell function into common/rc.  Fix it to avoid
duplicate output on errors.  Write the actual fsx parameters used into
$seqres.full instead of the BSIZE and PSIZE placeholders.

Include the symbolic fallocate mode in fsx error messages instead of the
numeric value.  Use fprintf(stderr, ...) instead of warn() when
including strerror(errno) doesn't make sense.

Signed-off-by: Andreas Gruenbacher <agruenba@redhat.com>
Signed-off-by: Dave Chinner <david@fromorbit.com>
This commit is contained in:
Andreas Gruenbacher
2016-01-11 14:43:40 +11:00
committed by Dave Chinner
parent b7fd3f05d6
commit 3597757462
4 changed files with 22 additions and 29 deletions
-12
View File
@@ -43,18 +43,6 @@ _require_odirect
rm -f $seqres.full
run_fsx()
{
echo fsx $@ | tee -a $seqres.full
args=`echo $@ | sed -e "s/ BSIZE / $bsize /g" -e "s/ PSIZE / $psize /g"`
rm -f $TEST_DIR/junk
$here/ltp/fsx $args $FSX_AVOID $TEST_DIR/junk >>$seqres.full 2>&1
if [ $? -ne 0 ]; then
cat $seqres.full
exit 1
fi
}
psize=`$here/src/feature -s`
bsize=`_min_dio_alignment $TEST_DEV`