2 # SPDX-License-Identifier: GPL-2.0-or-later
3 # Copyright (c) 2021 Oracle. All Rights Reserved.
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.
13 # The appropriate XFS patch is:
14 # xfs: fix incorrect root dquot corruption error when switching group/project
18 seqres=$RESULT_DIR/$seq
19 echo "QA output created by $seq"
23 status=1 # failure is the default!
24 trap "_cleanup; exit \$status" 0 1 2 3 15
32 # get standard environment, filters and checks
36 # real QA test starts here
45 echo "Format filesystem" | tee -a $seqres.full
46 _scratch_mkfs > $seqres.full
48 echo "Mount with project quota" | tee -a $seqres.full
49 _qmount_option 'prjquota'
51 _require_prjquota $SCRATCH_DEV
53 echo "Mount with group quota" | tee -a $seqres.full
54 _qmount_option 'grpquota'
56 $here/src/feature -G $SCRATCH_DEV || echo "group quota didn't mount?"
58 echo "Check dmesg for corruption"
59 _dmesg_since_test_start | grep corruption