xfs: no excessive warnings about dprecated mount options on remount
[xfstests-dev.git] / tests / xfs / 527
1 #! /bin/bash
2 # SPDX-License-Identifier: GPL-2.0-or-later
3 # Copyright (c) 2021 Oracle.  All Rights Reserved.
4 #
5 # FS QA Test No. 527
6 #
7 # Regression test for incorrect validation of ondisk dquot type flags when
8 # we're switching between group and project quotas while mounting a V4
9 # filesystem.  This test doesn't actually force the creation of a V4 fs because
10 # even V5 filesystems ought to be able to switch between the two without
11 # triggering corruption errors.
12 #
13 # The appropriate XFS patch is:
14 # xfs: fix incorrect root dquot corruption error when switching group/project
15 # quota types
16
17 seq=`basename $0`
18 seqres=$RESULT_DIR/$seq
19 echo "QA output created by $seq"
20
21 here=`pwd`
22 tmp=/tmp/$$
23 status=1    # failure is the default!
24 trap "_cleanup; exit \$status" 0 1 2 3 15
25
26 _cleanup()
27 {
28         cd /
29         rm -f $tmp.*
30 }
31
32 # get standard environment, filters and checks
33 . ./common/rc
34 . ./common/quota
35
36 # real QA test starts here
37 _supported_fs xfs
38 _require_xfs_debug
39 _require_quota
40 _require_scratch
41 _require_check_dmesg
42
43 rm -f $seqres.full
44
45 echo "Format filesystem" | tee -a $seqres.full
46 _scratch_mkfs > $seqres.full
47
48 echo "Mount with project quota" | tee -a $seqres.full
49 _qmount_option 'prjquota'
50 _qmount
51 _require_prjquota $SCRATCH_DEV
52
53 echo "Mount with group quota" | tee -a $seqres.full
54 _qmount_option 'grpquota'
55 _qmount
56 $here/src/feature -G $SCRATCH_DEV || echo "group quota didn't mount?"
57
58 echo "Check dmesg for corruption"
59 _dmesg_since_test_start | grep corruption
60
61 # success, all done
62 status=0
63 exit