4 # Run fsstress with quotas enabled and limits set low and verify accounted
7 # Derived from test 231
8 #-----------------------------------------------------------------------
9 # Copyright (c) 2006 Silicon Graphics, Inc. All Rights Reserved.
11 # This program is free software; you can redistribute it and/or
12 # modify it under the terms of the GNU General Public License as
13 # published by the Free Software Foundation.
15 # This program is distributed in the hope that it would be useful,
16 # but WITHOUT ANY WARRANTY; without even the implied warranty of
17 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 # GNU General Public License for more details.
20 # You should have received a copy of the GNU General Public License
21 # along with this program; if not, write the Free Software Foundation,
22 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
24 #-----------------------------------------------------------------------
30 echo "QA output created by $seq"
34 status=1 # failure is the default!
35 trap "rm -f $tmp.*; exit \$status" 0 1 2 3 15
37 # get standard environment, filters and checks
42 FSX_FILE_SIZE=64000000
43 FSX_ARGS="-q -l $FSX_FILE_SIZE -o 65536 -S 191110531 -N 100000"
47 tee -a $here/$seq.full |\
48 sed -e 's/[0-9][0-9]* inodes/I inodes/g' \
49 -e 's/[0-9][0-9]* paths/P paths/g' \
50 -e 's/seed = [0-9][0-9]*/seed = S/'
56 echo "Testing fsstress"
59 out=$SCRATCH_MNT/fsstress.$$
62 -f rmdir=20 -f link=10 -f creat=10 -f mkdir=10 -f unlink=20 -f symlink=10 \
63 -f rename=10 -f fsync=2 -f write=15 -f dwrite=15 \
64 -n $count -d $out -p 7"
66 echo "fsstress $args" | tee -a $here/$seq.full | sed -e "s#$out#outdir#"
67 if ! su $qa_user -c "$FSSTRESS_PROG $args" | tee -a $here/$seq.full | _filter_num
69 echo " fsstress $args returned $?"
70 cat $tmp.out | tee -a $here/$seq.full
75 # real QA test starts here
83 _scratch_mkfs >> $seq.full 2>&1
84 _scratch_mount "-o usrquota,grpquota"
85 chmod 777 $SCRATCH_MNT
86 quotacheck -u -g $SCRATCH_MNT 2>/dev/null
87 quotaon -u -g $SCRATCH_MNT 2>/dev/null
88 setquota -u $qa_user 32000 32000 1000 1000 $SCRATCH_MNT 2>/dev/null
91 umount $SCRATCH_DEV 2>/dev/null
95 if ! _check_quota_usage; then
96 umount $SCRATCH_DEV 2>/dev/null
101 umount $SCRATCH_DEV 2>/dev/null