2 #-----------------------------------------------------------------------
3 # Copyright (c) 2000 Silicon Graphics, Inc. All Rights Reserved.
5 # This program is free software; you can redistribute it and/or modify it
6 # under the terms of version 2 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, but
10 # WITHOUT ANY WARRANTY; without even the implied warranty of
11 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
13 # Further, this software is distributed without any warranty that it is
14 # free of the rightful claim of any third person regarding infringement
15 # or the like. Any license provided herein, whether implied or
16 # otherwise, applies only to this software file. Patent licenses, if
17 # any, provided herein do not apply to combinations of this program with
18 # other software, or any other product whatsoever.
20 # You should have received a copy of the GNU General Public License along
21 # with this program; if not, write the Free Software Foundation, Inc., 59
22 # Temple Place - Suite 330, Boston MA 02111-1307, USA.
24 # Contact information: Silicon Graphics, Inc., 1600 Amphitheatre Pkwy,
25 # Mountain View, CA 94043, or:
29 # For further information regarding this notice, see:
31 # http://oss.sgi.com/projects/GenInfo/SGIGPLNoticeExplan/
32 #-----------------------------------------------------------------------
37 # get standard environment, filters and checks
43 status=1 # failure is the default!
48 umount $SCRATCH_DEV >/dev/null 2>&1
51 trap "_cleanup; exit \$status" 0 1 2 3 15
55 FULL="$ROOT/soak.full"
97 _log "*** soak test started (passes=$passes, stress=$stress, proc=$proc)"
102 _log " *** unmounting scratch device"
104 umount $SCRATCH_DEV 2>&1 | _fix_malloc >>$FULL
106 _log " *** clean scratch device"
108 mkfs -t xfs -f $SCRATCH_DEV 2>&1 | _fix_malloc >>$FULL \
109 || _fail " !!! failed to mkfs SCRATCH_DEV"
113 while [ $pass -le $passes -o $passes -lt 0 ]
115 _log " *** pass $pass (`date`)"
118 _check_fs $SCRATCH_DEV
120 _log " *** mounting scratch device"
122 if ! mount -t xfs $SCRATCH_DEV $SCRATCH_MNT 2>&1 | _logp
124 _fail " !!! failed to mount"
130 rm -rf $SCRATCH_MNT/soak_test \
131 || _fail " !!! couldn't delete old dir"
134 _check_fs $SCRATCH_DEV
138 mkdir $SCRATCH_MNT/soak_test \
139 || _fail " !!! couldn't delete old dir"
142 src/fsstress -d $SCRATCH_MNT/soak_test -p $proc -n $stress $FSSTRESS_AVOID 2>&1 | \
145 _log " *** unmounting scratch device"
147 umount $SCRATCH_DEV 2>&1 | _logp \
148 || _fail " !!! failed to umount"
150 let "pass = pass + 1"