common/rc: add _scratch_{u}mount_idmapped() helpers
[xfstests-dev.git] / tests / xfs / 489
1 #! /bin/bash
2 # SPDX-License-Identifier: GPL-2.0
3 # Copyright (c) 2018 Oracle, Inc.  All rights reserved.
4 #
5 # FS QA Test No. 489
6 #
7 # Populate a XFS filesystem and fuzz every project dquot field.
8 # Do not fix the filesystem, to test metadata verifiers.
9
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 "_cleanup; exit \$status" 0 1 2 3 7 15
18
19 _cleanup()
20 {
21         cd /
22         rm -rf $tmp.*
23 }
24
25 # get standard environment, filters and checks
26 . ./common/rc
27 . ./common/filter
28 . ./common/populate
29 . ./common/fuzzy
30 . ./common/quota
31
32 # real QA test starts here
33 _supported_fs xfs
34 _require_scratch_xfs_fuzz_fields
35 _disable_dmesg_check
36 _require_quota
37
38 echo "Format and populate"
39 _scratch_populate_cached nofill > $seqres.full 2>&1
40 echo "${MOUNT_OPTIONS}" | grep -q 'prjquota' || _notrun "project quota disabled"
41
42 echo "Fuzz project 0 dquot"
43 _scratch_xfs_fuzz_metadata '' 'none'  "dquot -p 0" >> $seqres.full
44 echo "Done fuzzing dquot"
45
46 # success, all done
47 status=0
48 exit