6 #-----------------------------------------------------------------------
7 # Copyright (c) 2000-2002 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 #-----------------------------------------------------------------------
26 seqres=$RESULT_DIR/$seq
27 echo "QA output created by $seq"
31 status=0 # success is the default!
32 trap "_cleanup; exit \$status" 0 1 2 3 15
37 # we might get here with a RO FS
39 # now remove fsstress directory.
40 rm -rf $TEST_DIR/fsstress.$$.*
45 ls -l $1 | $AWK_PROG '{print " filesize = " $5}'
48 # get standard environment, filters and checks
58 out=$TEST_DIR/fsstress.$$.$_n
62 echo " failed to mkdir $out"
68 echo "-----------------------------------------------"
69 echo "fsstress.$_n : $_param"
70 echo "-----------------------------------------------"
71 # -m limits number of users/groups so check doesn't fail (malloc) later
72 dbgoutfile=$seqres.full
73 if ! $FSSTRESS_PROG $_param $FSSTRESS_AVOID -v -m 8 -n $_count -d $out >>$dbgoutfile 2>&1
75 echo " fsstress (count=$_count) returned $? - see $seqres.full"
76 echo "--------------------------------------" >>$seqres.full
77 echo "$_n - output from fsstress:" >>$seqres.full
78 echo "--------------------------------------" >>$seqres.full
79 echo "<NOT LOGGED>" >>$seqres.full
80 #cat $tmp.out >>$seqres.full
87 # real QA test starts here
93 echo "brevity is wit..."
102 _do_test 1 "-r" $count
104 # and the default with multiprocess
106 _do_test 2 "-p $procs -r" $count
110 _do_test 3 "-p 4 -z -f rmdir=10 -f link=10 -f creat=10 -f mkdir=10 -f rename=30 -f stat=30 -f unlink=30 -f truncate=20" $count
112 # if all ok by here then probably don't need $seqres.full
117 # Test with error injection:
120 # fsstress -n 1000 -d $scratch -p 4 -z -f rmdir=10 -f link=10 -f creat=10 \
121 # -f mkdir=10 -f rename=30 -f stat=30 -f unlink=30 -f truncate=20 \
124 # Error values 1 - 6 test IFLUSH
125 # 1 - corrupt buffer being flushed to di_core.di_magic
126 # 2 - corrupt inode being flushed i_d.di_magic
127 # 3 - corrupt S_IFREG format check
128 # 4 - corrupt S_IFDIR format check
129 # 5 - corrupt i_d.di_nextents
130 # 6 - corrupt i_d.di_forkoff > sb_inodesize