2 # SPDX-License-Identifier: GPL-2.0
3 # Copyright (c) 2000-2002 Silicon Graphics, Inc. All Rights Reserved.
10 seqres=$RESULT_DIR/$seq
11 echo "QA output created by $seq"
15 status=0 # success is the default!
16 trap "_cleanup; exit \$status" 0 1 2 3 15
21 # we might get here with a RO FS
23 # now remove fsstress directory.
24 rm -rf $TEST_DIR/fsstress.$$.*
29 ls -l $1 | $AWK_PROG '{print " filesize = " $5}'
32 # get standard environment, filters and checks
42 out=$TEST_DIR/fsstress.$$.$_n
46 echo " failed to mkdir $out"
52 echo "-----------------------------------------------"
53 echo "fsstress.$_n : $_param"
54 echo "-----------------------------------------------"
55 # -m limits number of users/groups so check doesn't fail (malloc) later
56 dbgoutfile=$seqres.full
57 if ! $FSSTRESS_PROG $_param $FSSTRESS_AVOID -v -m 8 -n $_count -d $out >>$dbgoutfile 2>&1
59 echo " fsstress (count=$_count) returned $? - see $seqres.full"
60 echo "--------------------------------------" >>$seqres.full
61 echo "$_n - output from fsstress:" >>$seqres.full
62 echo "--------------------------------------" >>$seqres.full
63 echo "<NOT LOGGED>" >>$seqres.full
64 #cat $tmp.out >>$seqres.full
71 # real QA test starts here
77 echo "brevity is wit..."
86 _do_test 1 "-r" $count
88 # and the default with multiprocess
90 _do_test 2 "-p $procs -r" $count
94 _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
96 # if all ok by here then probably don't need $seqres.full
101 # Test with error injection:
104 # fsstress -n 1000 -d $scratch -p 4 -z -f rmdir=10 -f link=10 -f creat=10 \
105 # -f mkdir=10 -f rename=30 -f stat=30 -f unlink=30 -f truncate=20 \
108 # Error values 1 - 6 test IFLUSH
109 # 1 - corrupt buffer being flushed to di_core.di_magic
110 # 2 - corrupt inode being flushed i_d.di_magic
111 # 3 - corrupt S_IFREG format check
112 # 4 - corrupt S_IFDIR format check
113 # 5 - corrupt i_d.di_nextents
114 # 6 - corrupt i_d.di_forkoff > sb_inodesize