generic/402: Drop useless fail message
[xfstests-dev.git] / tests / generic / 232
1 #! /bin/bash
2 # SPDX-License-Identifier: GPL-2.0
3 # Copyright (c) 2006 Silicon Graphics, Inc.  All Rights Reserved.
4 #
5 # FSQA Test No. 232
6 #
7 # Run fsstress with quotas enabled and verify accounted quotas in the end
8 #
9 # Derived from test 231
10 seq=`basename $0`
11 seqres=$RESULT_DIR/$seq
12 echo "QA output created by $seq"
13
14 here=`pwd`
15 tmp=/tmp/$$
16 status=1        # failure is the default!
17 trap "rm -f $tmp.*; exit \$status" 0 1 2 3 15
18
19 # get standard environment, filters and checks
20 . ./common/rc
21 . ./common/filter
22 . ./common/quota
23
24 _filter_num()
25 {
26         tee -a $seqres.full |\
27         sed -e 's/[0-9][0-9]* inodes/I inodes/g' \
28             -e 's/[0-9][0-9]* paths/P paths/g' \
29             -e 's/seed = [0-9][0-9]*/seed = S/'
30 }
31
32 _fsstress()
33 {
34         echo ""
35         echo "Testing fsstress"
36         echo ""
37
38         out=$SCRATCH_MNT/fsstress.$$
39         count=2000
40         args=`_scale_fsstress_args -d $out -n $count -p 7 $FSSTRESS_AVOID`
41
42         echo "fsstress $args" >> $seqres.full
43         if ! $FSSTRESS_PROG $args | tee -a $seqres.full | _filter_num
44         then
45                 echo "    fsstress $args returned $?"
46                 cat $tmp.out | tee -a $seqres.full
47                 status=1
48         fi
49 }
50
51 # real QA test starts here
52 _supported_fs generic
53 _require_scratch
54 _require_quota
55
56 _scratch_mkfs > $seqres.full 2>&1
57 _scratch_mount "-o usrquota,grpquota"
58 chmod 777 $SCRATCH_MNT
59 quotacheck -u -g $SCRATCH_MNT 2>/dev/null
60 quotaon -u -g $SCRATCH_MNT 2>/dev/null
61
62 _fsstress
63 _check_quota_usage
64 _scratch_unmount
65 status=0
66 exit