6 #-----------------------------------------------------------------------
7 # Copyright (c) 2000-2003 Silicon Graphics, Inc. All Rights Reserved.
9 # This program is free software; you can redistribute it and/or modify it
10 # under the terms of version 2 of the GNU General Public License as
11 # published by the Free Software Foundation.
13 # This program is distributed in the hope that it would be useful, but
14 # WITHOUT ANY WARRANTY; without even the implied warranty of
15 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
17 # Further, this software is distributed without any warranty that it is
18 # free of the rightful claim of any third person regarding infringement
19 # or the like. Any license provided herein, whether implied or
20 # otherwise, applies only to this software file. Patent licenses, if
21 # any, provided herein do not apply to combinations of this program with
22 # other software, or any other product whatsoever.
24 # You should have received a copy of the GNU General Public License along
25 # with this program; if not, write the Free Software Foundation, Inc., 59
26 # Temple Place - Suite 330, Boston MA 02111-1307, USA.
28 # Contact information: Silicon Graphics, Inc., 1600 Amphitheatre Pkwy,
29 # Mountain View, CA 94043, or:
33 # For further information regarding this notice, see:
35 # http://oss.sgi.com/projects/GenInfo/SGIGPLNoticeExplan/
36 #-----------------------------------------------------------------------
42 echo "QA output created by $seq"
46 status=0 # success is the default!
47 trap "_cleanup; exit \$status" 0 1 2 3 15
52 rm -rf $testdir/fstest.$$.* $tmp.*
56 # get standard environment, filters and checks
65 out=$testdir/fstest.$$.$_n
69 echo " failed to mkdir $out"
74 _filter_param=`echo "$_param" | sed\
75 -e 's/-n [0-9][0-9]*/-n children/' \
76 -e 's/-l [0-9][0-9]*/-l loops/' \
77 -e 's/-f [0-9][0-9]*/-f files/'`
80 echo "-----------------------------------------------"
81 echo "fstest.$_n : $_filter_param"
82 echo "-----------------------------------------------"
83 if ! $here/src/fstest $_param -p $out >>$seq.full
85 echo " fstest ($_param) returned $? - see $seq.full"
95 echo "$0: [-f files] [-l loops] [-n children]"
100 while getopts "f:l:n:?" c $@
106 param_type="$param_type, overidde -f"
110 param_type="$param_type, overidde -l"
114 param_type="$param_type, overidde -n"
125 # real QA test starts here
126 rm -f $here/$seq.full
128 _supported_fs xfs udf nfs
129 _supported_os IRIX Linux
133 # These params can take a while on different CPUs/OSs
134 # so we set them differently for different machines
136 if [ $HOSTOS == "IRIX" ]; then
137 if uname -R | grep -iq debug; then
138 # e.g. getting around 37secs for 1,1,1 on IP30 debug
142 param_type="IRIX debug"
144 # getting around 1 sec 1,1,1 - 10secs 1,10,1 on IP30 nondebug
148 param_type="IRIX nondebug"
150 elif [ $HOSTOS == "Linux" ]; then
162 # can override the params here
165 echo "Params are for $param_type" >>$seq.full
166 echo "Params: n = $numchildren l = $numloops f = $numfiles" >>$seq.full
173 # -F generate files with holes (default=no)
174 # -n num_children set number of child processes (default=1)
175 # -f num_files set number of files (default=1)
176 # -s file_size set file sizes (default=1MiB)
177 # -b block_size set block (IO) size (default=1024)
178 # -l loops set loop count (default=100)
179 # -m use mmap (default=no)
180 # -S use synchronous IO (default=no)
181 # -P preallocate space (default=no)
183 size10=`expr 10 \* 1024 \* 1024` # 10 megabytes
184 size30=`expr 30 \* 1024 \* 1024` # 30 megabytes
186 _do_test 0 "-l $numloops"
188 _do_test 1 "-l $numloops -s $size10 -b 8192 -m"
190 _do_test 2 "-n $numchildren -F -l $numloops -f $numfiles -s $size30 -b 512"
192 _do_test 3 "-n $numchildren -F -l $numloops -f $numfiles -s $size30 -b 512 -m"