6 #-----------------------------------------------------------------------
7 # Copyright (c) 2000-2002 Silicon Graphics, Inc. All Rights Reserved.
8 #-----------------------------------------------------------------------
14 echo "QA output created by $seq"
18 status=0 # success is the default!
19 trap "_cleanup; exit \$status" 0 1 2 3 15
24 # we might get here with a RO FS
25 mount -o remount,rw $TEST_DEV >/dev/null 2>&1
26 # now remove fsstress directory.
27 # N.B. rm(1) on IRIX can find problems when building up a long pathname
28 # such that what it has is greater the 1024 chars and will
29 # stop and complain - so get rid of complaint
31 rm -rf $testdir/fsstress.$$.* 2>&1 | grep -v 'Path too long'
37 ls -l $1 | $AWK_PROG '{print " filesize = " $5}'
40 # get standard environment, filters and checks
50 out=$testdir/fsstress.$$.$_n
54 echo " failed to mkdir $out"
60 echo "-----------------------------------------------"
61 echo "fsstress.$_n : $_param"
62 echo "-----------------------------------------------"
63 # -m limits number of users/groups so check doesn't fail (malloc) later
65 if ! $FSSTRESS_PROG $_param $FSSTRESS_AVOID -v -m 8 -n $_count -d $out >>$dbgoutfile 2>&1
67 echo " fsstress (count=$_count) returned $? - see $seq.full"
68 echo "--------------------------------------" >>$here/$seq.full
69 echo "$_n - output from fsstress:" >>$here/$seq.full
70 echo "--------------------------------------" >>$here/$seq.full
71 echo "<NOT LOGGED>" >>$here/$seq.full
72 #cat $tmp.out >>$here/$seq.full
80 # real QA test starts here
82 _supported_os IRIX Linux
87 echo "brevity is wit..."
96 _do_test 1 "-r" $count
98 # and the default with multiprocess
100 _do_test 2 "-p $procs -r" $count
104 _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
106 # if all ok by here then probably don't need $seq.full
111 # Test with error injection:
114 # fsstress -n 1000 -d $scratch -p 4 -z -f rmdir=10 -f link=10 -f creat=10 \
115 # -f mkdir=10 -f rename=30 -f stat=30 -f unlink=30 -f truncate=20 \
118 # Error values 1 - 6 test IFLUSH
119 # 1 - corrupt buffer being flushed to di_core.di_magic
120 # 2 - corrupt inode being flushed i_d.di_magic
121 # 3 - corrupt S_IFREG format check
122 # 4 - corrupt S_IFDIR format check
123 # 5 - corrupt i_d.di_nextents
124 # 6 - corrupt i_d.di_forkoff > sb_inodesize