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 #-----------------------------------------------------------------------
21 # get standard environment, filters and checks
27 status=1 # failure is the default!
32 _scratch_unmount >/dev/null 2>&1
35 trap "_cleanup; exit \$status" 0 1 2 3 15
39 FULL="$ROOT/soak.full"
81 _log "*** soak test started (passes=$passes, stress=$stress, proc=$proc)"
86 _log " *** unmounting scratch device"
88 _scratch_unmount 2>&1 | _fix_malloc >>$FULL
90 _log " *** clean scratch device"
92 mkfs_xfs -f $SCRATCH_DEV 2>&1 | _fix_malloc >>$FULL \
93 || _fail " !!! failed to mkfs SCRATCH_DEV"
97 while [ $pass -le $passes -o $passes -lt 0 ]
99 _log " *** pass $pass (`date`)"
104 _log " *** mounting scratch device"
106 if ! _scratch_mount 2>&1 | _logp
108 _fail " !!! failed to mount"
114 rm -rf $SCRATCH_MNT/soak_test \
115 || _fail " !!! couldn't delete old dir"
122 mkdir $SCRATCH_MNT/soak_test \
123 || _fail " !!! couldn't delete old dir"
126 ltp/fsstress -d $SCRATCH_MNT/soak_test -p $proc -n $stress $FSSTRESS_AVOID 2>&1 | \
129 _log " *** unmounting scratch device"
131 _scratch_unmount 2>&1 | _logp \
132 || _fail " !!! failed to umount"
134 let "pass = pass + 1"