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.$$.*
27 # get standard environment, filters and checks
37 out=$TEST_DIR/fsstress.$$.$_n
41 echo " failed to mkdir $out"
47 echo "-----------------------------------------------"
48 echo "fsstress.$_n : $_param"
49 echo "-----------------------------------------------"
50 # -m limits number of users/groups so check doesn't fail (malloc) later
51 dbgoutfile=$seqres.full
52 if ! $FSSTRESS_PROG $_param $FSSTRESS_AVOID -v -m 8 -n $_count -d $out >>$dbgoutfile 2>&1
54 echo " fsstress (count=$_count) returned $? - see $seqres.full"
55 echo "--------------------------------------" >>$seqres.full
56 echo "$_n - output from fsstress:" >>$seqres.full
57 echo "--------------------------------------" >>$seqres.full
58 echo "<NOT LOGGED>" >>$seqres.full
59 #cat $tmp.out >>$seqres.full
66 # real QA test starts here
71 echo "brevity is wit..."
80 _do_test 1 "-r" $count
82 # and the default with multiprocess
84 _do_test 2 "-p $procs -r" $count
88 _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
90 # if all ok by here then probably don't need $seqres.full
95 # Test with error injection:
98 # fsstress -n 1000 -d $scratch -p 4 -z -f rmdir=10 -f link=10 -f creat=10 \
99 # -f mkdir=10 -f rename=30 -f stat=30 -f unlink=30 -f truncate=20 \
102 # Error values 1 - 6 test IFLUSH
103 # 1 - corrupt buffer being flushed to di_core.di_magic
104 # 2 - corrupt inode being flushed i_d.di_magic
105 # 3 - corrupt S_IFREG format check
106 # 4 - corrupt S_IFDIR format check
107 # 5 - corrupt i_d.di_nextents
108 # 6 - corrupt i_d.di_forkoff > sb_inodesize