2 # SPDX-License-Identifier: GPL-2.0
3 # Copyright (c) 2006 Silicon Graphics, Inc. All Rights Reserved.
7 # Run fsstress with quotas enabled and limits set low and verify accounted
10 # Derived from test 231
12 seqres=$RESULT_DIR/$seq
13 echo "QA output created by $seq"
17 status=1 # failure is the default!
18 trap "rm -f $tmp.*; exit \$status" 0 1 2 3 15
20 # get standard environment, filters and checks
27 tee -a $seqres.full |\
28 sed -e 's/[0-9][0-9]* inodes/I inodes/g' \
29 -e 's/[0-9][0-9]* paths/P paths/g' \
30 -e 's/seed = [0-9][0-9]*/seed = S/'
36 echo "Testing fsstress"
39 out=$SCRATCH_MNT/fsstress.$$
41 args=`_scale_fsstress_args -z \
42 -f rmdir=20 -f link=10 -f creat=10 -f mkdir=10 -f unlink=20 -f symlink=10 \
43 -f rename=10 -f fsync=2 -f write=15 -f dwrite=15 \
44 -n $count -d $out -p 7`
46 echo "fsstress $args" >> $seqres.full
47 if ! su $qa_user -c "$FSSTRESS_PROG $args" | tee -a $seqres.full | _filter_num
49 echo " fsstress $args returned $?"
50 cat $tmp.out | tee -a $seqres.full
55 # real QA test starts here
62 _scratch_mkfs > $seqres.full 2>&1
63 _scratch_mount "-o usrquota,grpquota"
64 chmod 777 $SCRATCH_MNT
65 quotacheck -u -g $SCRATCH_MNT 2>/dev/null
66 quotaon -u -g $SCRATCH_MNT 2>/dev/null
67 setquota -u $qa_user 32000 32000 1000 1000 $SCRATCH_MNT 2>/dev/null