2 #-----------------------------------------------------------------------
3 # Copyright (c) 2000-2002 Silicon Graphics, Inc. All Rights Reserved.
5 # This program is free software; you can redistribute it and/or
6 # modify it under the terms of the GNU General Public License as
7 # published by the Free Software Foundation.
9 # This program is distributed in the hope that it would be useful,
10 # but WITHOUT ANY WARRANTY; without even the implied warranty of
11 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 # GNU General Public License for more details.
14 # You should have received a copy of the GNU General Public License
15 # along with this program; if not, write the Free Software Foundation,
16 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
18 #-----------------------------------------------------------------------
23 # get standard environment, filters and checks
29 status=1 # failure is the default!
34 umount $SCRATCH_DEV >/dev/null 2>&1
37 trap "_cleanup; exit \$status" 0 1 2 3 15
41 FULL="$ROOT/soak.full"
83 _log "*** soak test started (passes=$passes, stress=$stress, proc=$proc)"
88 _log " *** unmounting scratch device"
90 umount $SCRATCH_DEV 2>&1 | _fix_malloc >>$FULL
92 _log " *** clean scratch device"
94 mkfs_xfs -f $SCRATCH_DEV 2>&1 | _fix_malloc >>$FULL \
95 || _fail " !!! failed to mkfs SCRATCH_DEV"
99 while [ $pass -le $passes -o $passes -lt 0 ]
101 _log " *** pass $pass (`date`)"
106 _log " *** mounting scratch device"
108 if ! _scratch_mount 2>&1 | _logp
110 _fail " !!! failed to mount"
116 rm -rf $SCRATCH_MNT/soak_test \
117 || _fail " !!! couldn't delete old dir"
124 mkdir $SCRATCH_MNT/soak_test \
125 || _fail " !!! couldn't delete old dir"
128 ltp/fsstress -d $SCRATCH_MNT/soak_test -p $proc -n $stress $FSSTRESS_AVOID 2>&1 | \
131 _log " *** unmounting scratch device"
133 umount $SCRATCH_DEV 2>&1 | _logp \
134 || _fail " !!! failed to umount"
136 let "pass = pass + 1"