2 # SPDX-License-Identifier: GPL-2.0
3 # Copyright (c) 2000-2002 Silicon Graphics, Inc. All Rights Reserved.
6 # get standard environment, filters and checks
12 status=1 # failure is the default!
17 _scratch_unmount >/dev/null 2>&1
20 trap "_cleanup; exit \$status" 0 1 2 3 15
24 FULL="$ROOT/soak.full"
66 _log "*** soak test started (passes=$passes, stress=$stress, proc=$proc)"
71 _log " *** unmounting scratch device"
73 _scratch_unmount 2>&1 >>$FULL
75 _log " *** clean scratch device"
77 mkfs_xfs -f $SCRATCH_DEV 2>&1 >>$FULL \
78 || _fail " !!! failed to mkfs SCRATCH_DEV"
82 while [ $pass -le $passes -o $passes -lt 0 ]
84 _log " *** pass $pass (`date`)"
89 _log " *** mounting scratch device"
91 if ! _scratch_mount 2>&1 | _logp
93 _fail " !!! failed to mount"
99 rm -rf $SCRATCH_MNT/soak_test \
100 || _fail " !!! couldn't delete old dir"
107 mkdir $SCRATCH_MNT/soak_test \
108 || _fail " !!! couldn't delete old dir"
111 ltp/fsstress -d $SCRATCH_MNT/soak_test -p $proc -n $stress $FSSTRESS_AVOID 2>&1 | \
114 _log " *** unmounting scratch device"
116 _scratch_unmount 2>&1 | _logp \
117 || _fail " !!! failed to umount"
119 let "pass = pass + 1"