summaryrefslogtreecommitdiff
path: root/tests/xfs/527
blob: 8abc866ff49989824bd2b18b76112260f5d9d8fb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
#! /bin/bash
# SPDX-License-Identifier: GPL-2.0-or-later
# Copyright (c) 2021 Oracle.  All Rights Reserved.
#
# FS QA Test No. 527
#
# Regression test for incorrect validation of ondisk dquot type flags when
# we're switching between group and project quotas while mounting a V4
# filesystem.  This test doesn't actually force the creation of a V4 fs because
# even V5 filesystems ought to be able to switch between the two without
# triggering corruption errors.
#
# The appropriate XFS patch is:
# xfs: fix incorrect root dquot corruption error when switching group/project
# quota types

. ./common/preamble
_begin_fstest auto quick quota

# Import common functions.
. ./common/quota

# real QA test starts here
_supported_fs xfs
_require_xfs_debug
_require_quota
_require_scratch
_require_check_dmesg

echo "Format filesystem" | tee -a $seqres.full
_scratch_mkfs > $seqres.full

echo "Mount with project quota" | tee -a $seqres.full
_qmount_option 'prjquota'
_qmount
_require_prjquota $SCRATCH_DEV

echo "Mount with group quota" | tee -a $seqres.full
_qmount_option 'grpquota'
_qmount
$here/src/feature -G $SCRATCH_DEV || echo "group quota didn't mount?"

echo "Check dmesg for corruption"
_dmesg_since_test_start | grep corruption

# success, all done
status=0
exit