6 #-----------------------------------------------------------------------
7 # Copyright (c) 2000-2003 Silicon Graphics, Inc. All Rights Reserved.
9 # This program is free software; you can redistribute it and/or
10 # modify it under the terms 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,
14 # but WITHOUT ANY WARRANTY; without even the implied warranty of
15 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 # GNU General Public License for more details.
18 # You should have received a copy of the GNU General Public License
19 # along with this program; if not, write the Free Software Foundation,
20 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
22 #-----------------------------------------------------------------------
28 echo "QA output created by $seq"
32 status=0 # success is the default!
33 trap "_cleanup; exit \$status" 0 1 2 3 15
38 rm -rf $testdir/fstest.$$.* $tmp.*
42 # get standard environment, filters and checks
51 out=$testdir/fstest.$$.$_n
55 echo " failed to mkdir $out"
60 _filter_param=`echo "$_param" | sed\
61 -e 's/-n [0-9][0-9]*/-n children/' \
62 -e 's/-l [0-9][0-9]*/-l loops/' \
63 -e 's/-f [0-9][0-9]*/-f files/'`
66 echo "-----------------------------------------------"
67 echo "fstest.$_n : $_filter_param"
68 echo "-----------------------------------------------"
69 if ! $here/src/fstest $_param -p $out >>$seq.full
71 echo " fstest ($_param) returned $? - see $seq.full"
81 echo "$0: [-f files] [-l loops] [-n children]"
86 while getopts "f:l:n:?" c $@
92 param_type="$param_type, overidde -f"
96 param_type="$param_type, overidde -l"
100 param_type="$param_type, overidde -n"
111 # real QA test starts here
112 rm -f $here/$seq.full
114 _supported_fs generic
115 _supported_os IRIX Linux
119 # These params can take a while on different CPUs/OSs
120 # so we set them differently for different machines
122 if [ $HOSTOS == "IRIX" ]; then
123 if uname -R | grep -iq debug; then
124 # e.g. getting around 37secs for 1,1,1 on IP30 debug
128 param_type="IRIX debug"
130 # getting around 1 sec 1,1,1 - 10secs 1,10,1 on IP30 nondebug
134 param_type="IRIX nondebug"
136 elif [ $HOSTOS == "Linux" ]; then
137 if uname -a | grep -q SMP; then
141 param_type="Linux SMP"
146 param_type="Linux UP"
155 # can override the params here
158 echo "Params are for $param_type" >>$seq.full
159 echo "Params: n = $numchildren l = $numloops f = $numfiles" >>$seq.full
166 # -F generate files with holes (default=no)
167 # -n num_children set number of child processes (default=1)
168 # -f num_files set number of files (default=1)
169 # -s file_size set file sizes (default=1MiB)
170 # -b block_size set block (IO) size (default=1024)
171 # -l loops set loop count (default=100)
172 # -m use mmap (default=no)
173 # -S use synchronous IO (default=no)
174 # -P preallocate space (default=no)
176 size10=`expr 10 \* 1024 \* 1024` # 10 megabytes
177 size30=`expr 30 \* 1024 \* 1024` # 30 megabytes
179 _do_test 0 "-l $numloops"
181 _do_test 1 "-l $numloops -s $size10 -b 8192 -m"
183 _do_test 2 "-n $numchildren -F -l $numloops -f $numfiles -s $size30 -b 512"
185 _do_test 3 "-n $numchildren -F -l $numloops -f $numfiles -s $size30 -b 512 -m"
187 _do_test 4 "-n $numchildren -F -l $numloops -f $numfiles -s $size10 -b 512 -mS"