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 _begin_fstest auto quota stress
14 # Import common functions.
20 tee -a $seqres.full |\
21 sed -e 's/[0-9][0-9]* inodes/I inodes/g' \
22 -e 's/[0-9][0-9]* paths/P paths/g' \
23 -e 's/seed = [0-9][0-9]*/seed = S/'
29 echo "Testing fsstress"
32 out=$SCRATCH_MNT/fsstress.$$
34 args=`_scale_fsstress_args -z \
35 -f rmdir=20 -f link=10 -f creat=10 -f mkdir=10 -f unlink=20 -f symlink=10 \
36 -f rename=10 -f fsync=2 -f write=15 -f dwrite=15 \
37 -n $count -d $out -p 7`
39 # io_uring accounts memory it needs under the rlimit memlocked option,
40 # which can be quite low on some setups (especially 64K pagesize). root
41 # isn't under this restriction, but regular users are. To avoid the
42 # io_uring_queue_init fail on ENOMEM, set max locked memory to unlimited
45 echo "fsstress $args" >> $seqres.full
46 if ! su $qa_user -c "$FSSTRESS_PROG $args" | tee -a $seqres.full | _filter_num
48 echo " fsstress $args returned $?"
49 cat $tmp.out | tee -a $seqres.full
54 # real QA test starts here
60 _scratch_mkfs > $seqres.full 2>&1
61 _scratch_mount "-o usrquota,grpquota"
62 chmod 777 $SCRATCH_MNT
63 quotacheck -u -g $SCRATCH_MNT 2>/dev/null
64 quotaon -u -g $SCRATCH_MNT 2>/dev/null
65 setquota -u $qa_user 32000 32000 1000 1000 $SCRATCH_MNT 2>/dev/null