@@ -131,6 +131,9 @@ export UMOUNT_PROG="$(type -P umount)"
export FSSTRESS_PROG="$here/ltp/fsstress"
[ ! -x $FSSTRESS_PROG ] && _fatal "fsstress not found or executable"
+export FSX_PROG="$here/ltp/fsx"
+[ ! -x $FSX_PROG ] && _fatal "fsx not found or executable"
+
export PERL_PROG="$(type -P perl)"
[ "$PERL_PROG" = "" ] && _fatal "perl not found"
@@ -969,7 +969,7 @@ __stress_scrub_fsx_loop() {
focus+=(-l $((600000 * LOAD_FACTOR)) )
local args="$FSX_AVOID ${focus[@]} ${SCRATCH_MNT}/fsx.$seq"
- echo "Running $here/ltp/fsx $args" >> $seqres.full
+ echo "Running $FSX_PROG $args" >> $seqres.full
if [ -n "$remount_period" ]; then
local mode="rw"
@@ -980,7 +980,7 @@ __stress_scrub_fsx_loop() {
test "$mode" = "rw" && __stress_scrub_clean_scratch && continue
duration=$(___stress_scrub_duration "$end" "$remount_period")
- $here/ltp/fsx $duration $args $rw_arg >> $seqres.full
+ $FSX_PROG $duration $args $rw_arg >> $seqres.full
res=$?
echo "$mode fsx exits with $res at $(date)" >> $seqres.full
test "$res" -ne 0 && break
@@ -1007,7 +1007,7 @@ __stress_scrub_fsx_loop() {
# Need to recheck running conditions if we cleared anything
__stress_scrub_clean_scratch && continue
duration=$(___stress_scrub_duration "$end" "$remount_period")
- $here/ltp/fsx $duration $args >> $seqres.full
+ $FSX_PROG $duration $args >> $seqres.full
res=$?
echo "fsx exits with $res at $(date)" >> $seqres.full
test "$res" -ne 0 && break
@@ -5050,7 +5050,7 @@ _get_page_size()
_require_hugepage_fsx()
{
- $here/ltp/fsx -N 0 -h $TEST_DIR 2>&1 | grep -q 'MADV_COLLAPSE not supported' && \
+ $FSX_PROG -N 0 -h $TEST_DIR 2>&1 | grep -q 'MADV_COLLAPSE not supported' && \
_notrun "fsx binary does not support MADV_COLLAPSE"
}
@@ -5058,7 +5058,7 @@ _run_fsx()
{
echo "fsx $*"
local args=`echo $@ | sed -e "s/ BSIZE / $bsize /g" -e "s/ PSIZE / $psize /g"`
- set -- $here/ltp/fsx $args $FSX_AVOID $TEST_DIR/junk
+ set -- $FSX_PROG $args $FSX_AVOID $TEST_DIR/junk
echo "$@" >>$seqres.full
rm -f $TEST_DIR/junk
"$@" 2>&1 | tee -a $seqres.full >$tmp.fsx
@@ -53,7 +53,7 @@ _do_test()
# This cd and use of -P gets full debug on "$RESULT_DIR" (not TEST_DEV)
cd $out
- if ! $here/ltp/fsx $_param -P "$RESULT_DIR" $seq.$_n $FSX_AVOID &>/dev/null
+ if ! $FSX_PROG $_param -P "$RESULT_DIR" $seq.$_n $FSX_AVOID &>/dev/null
then
echo " fsx ($_param) failed, $? - compare $seqres.$_n.{good,bad,fsxlog}"
mv $out/$seq.$_n $seqres.$_n.full
@@ -53,7 +53,7 @@ _do_test()
# This cd and use of -P gets full debug on "$RESULT_DIR" (not TEST_DEV)
cd $out
- if ! $here/ltp/fsx $_param -P "$RESULT_DIR" $FSX_AVOID $seq.$_n &>/dev/null
+ if ! $FSX_PROG $_param -P "$RESULT_DIR" $FSX_AVOID $seq.$_n &>/dev/null
then
echo " fsx ($_param) returned $? - see $seq.$_n.full"
mv "$RESULT_DIR"/$seq.$_n.fsxlog $seqres.$_n.full
@@ -31,9 +31,9 @@ FSX_ARGS="-q -l $FSX_FILE_SIZE -o 65536 -S 191110531 -N 100000"
_fsx_lite_nommap()
{
dd if=/dev/zero of=$TEST_DIR/fsx_lite_nommap bs=${FSX_FILE_SIZE} count=1 > /dev/null 2>&1
- if ! ltp/fsx $FSX_ARGS -L -R -W $FSX_AVOID $TEST_DIR/fsx_lite_nommap > $tmp.output 2>&1
+ if ! $FSX_PROG $FSX_ARGS -L -R -W $FSX_AVOID $TEST_DIR/fsx_lite_nommap > $tmp.output 2>&1
then
- echo "ltp/fsx $FSX_ARGS -L -R -W $TEST_DIR/fsx_lite_nommap"
+ echo "$FSX_PROG $FSX_ARGS -L -R -W $TEST_DIR/fsx_lite_nommap"
cat $tmp.output
return 1
fi
@@ -44,9 +44,9 @@ _fsx_lite_nommap()
_fsx_lite_mmap()
{
dd if=/dev/zero of=$TEST_DIR/fsx_lite_mmap bs=${FSX_FILE_SIZE} count=1 > /dev/null 2>&1
- if ! ltp/fsx $FSX_ARGS -L $FSX_AVOID $TEST_DIR/fsx_lite_mmap > $tmp.output 2>&1
+ if ! $FSX_PROG $FSX_ARGS -L $FSX_AVOID $TEST_DIR/fsx_lite_mmap > $tmp.output 2>&1
then
- echo "ltp/fsx $FSX_ARGS -L fsx_lite_mmap"
+ echo "$FSX_PROG $FSX_ARGS -L fsx_lite_mmap"
cat $tmp.output
return 1
fi
@@ -58,9 +58,9 @@ _fsx_std_nommap()
{
local fname="$TEST_DIR/$1"
- if ! ltp/fsx $FSX_ARGS -R -W $FSX_AVOID $fname > $tmp.output 2>&1
+ if ! $FSX_PROG $FSX_ARGS -R -W $FSX_AVOID $fname > $tmp.output 2>&1
then
- echo "ltp/fsx $FSX_ARGS -R -W fsx_std_nommap"
+ echo "$FSX_PROG $FSX_ARGS -R -W fsx_std_nommap"
cat $tmp.output
return 1
fi
@@ -72,9 +72,9 @@ _fsx_std_mmap()
{
local fname="$TEST_DIR/$1"
- if ! ltp/fsx $FSX_ARGS $FSX_AVOID $fname > $tmp.output 2>&1
+ if ! $FSX_PROG $FSX_ARGS $FSX_AVOID $fname > $tmp.output 2>&1
then
- echo "ltp/fsx $FSX_ARGS fsx_std_mmap"
+ echo "$FSX_PROG $FSX_ARGS fsx_std_mmap"
cat $tmp.output
return 1
fi
@@ -23,8 +23,8 @@ _fsx()
echo "=== FSX Standard Mode, Memory Mapping, $tasks Tasks ==="
for (( i = 1; i <= $tasks; i++ )); do
SEED=$RANDOM
- echo "ltp/fsx $FSX_ARGS -S $SEED $SCRATCH_MNT/fsx_file$i" >>$seqres.full
- _su $qa_user -c "ltp/fsx $FSX_ARGS -S $SEED \
+ echo "$FSX_PROG $FSX_ARGS -S $SEED $SCRATCH_MNT/fsx_file$i" >>$seqres.full
+ _su $qa_user -c "$FSX_PROG $FSX_ARGS -S $SEED \
$FSX_AVOID $SCRATCH_MNT/fsx_file$i" >$tmp.output$i 2>&1 &
done
@@ -79,7 +79,7 @@ FSX_OPTS="-N $NUM_OPS -d -P $SANITY_DIR -i $LOGWRITES_DMDEV"
seeds=(0 0 0 0)
# Run fsx for a while
for j in `seq 0 $((NUM_FILES-1))`; do
- run_check $here/ltp/fsx $FSX_OPTS $FSX_AVOID -S ${seeds[$j]} -j $j $SCRATCH_MNT/testfile$j &
+ run_check $FSX_PROG $FSX_OPTS $FSX_AVOID -S ${seeds[$j]} -j $j $SCRATCH_MNT/testfile$j &
done
wait
@@ -53,7 +53,7 @@ write 0x3e5ec 0x1a14 0x21446
zero_range 0x20fac 0x6d9c 0x40000 keep_size
mapwrite 0x216ad 0x274f 0x40000
EOF
-run_check $here/ltp/fsx -d --replay-ops $fsxops $SCRATCH_MNT/testfile
+run_check $FSX_PROG -d --replay-ops $fsxops $SCRATCH_MNT/testfile
_flakey_drop_and_remount
_unmount_flakey
@@ -82,7 +82,7 @@ FSX_OPTS="-N $NUM_OPS -d -k -P $SANITY_DIR -i $LOGWRITES_DMDEV"
for j in `seq 0 $((NUM_FILES-1))`; do
# clone the clone from prev iteration which may have already mutated
_cp_reflink $SCRATCH_MNT/testfile$((j-1)) $SCRATCH_MNT/testfile$j
- run_check $here/ltp/fsx $FSX_OPTS $FSX_AVOID -S 0 -j $j $SCRATCH_MNT/testfile$j &
+ run_check $FSX_PROG $FSX_OPTS $FSX_AVOID -S 0 -j $j $SCRATCH_MNT/testfile$j &
done
wait
@@ -35,7 +35,7 @@ _require_xfs_io_command "fzero"
run_fsx()
{
- $here/ltp/fsx $2 --replay-ops $1 $file 2>&1 | tee -a $seqres.full >$tmp.fsx
+ $FSX_PROG $2 --replay-ops $1 $file 2>&1 | tee -a $seqres.full >$tmp.fsx
if [ ${PIPESTATUS[0]} -ne 0 ]; then
cat $tmp.fsx
exit 1
@@ -35,7 +35,7 @@ ENDL
victim=$SCRATCH_MNT/a
touch $victim
-$here/ltp/fsx --replay-ops $tmp.fsxops $victim > $tmp.output 2>&1 || cat $tmp.output
+$FSX_PROG --replay-ops $tmp.fsxops $victim > $tmp.output 2>&1 || cat $tmp.output
echo "Silence is golden"
status=0
@@ -32,7 +32,7 @@ ENDL
victim=$SCRATCH_MNT/a
touch $victim
-$here/ltp/fsx --replay-ops $tmp.fsxops $victim > $tmp.output 2>&1 || cat $tmp.output
+$FSX_PROG --replay-ops $tmp.fsxops $victim > $tmp.output 2>&1 || cat $tmp.output
echo "Silence is golden"
status=0