2 # SPDX-License-Identifier: GPL-2.0-or-later
3 # Copyright (c) 2020, Oracle and/or its affiliates. All Rights Reserved.
7 # Make sure that the quota default grace period and maximum warning limits
11 seqres=$RESULT_DIR/$seq
12 echo "QA output created by $seq"
16 status=1 # failure is the default!
17 trap "_cleanup; exit \$status" 0 1 2 3 15
25 # get standard environment, filters and checks
30 # real QA test starts here
38 # Format filesystem and set up quota limits
39 _scratch_mkfs > $seqres.full
40 _qmount_option "usrquota"
41 _scratch_mount >> $seqres.full
43 $XFS_QUOTA_PROG -x -c 'timer -u 300m' $SCRATCH_MNT
44 $XFS_QUOTA_PROG -x -c 'state' $SCRATCH_MNT | grep 'grace time'
47 # Remount and check the limits
48 _scratch_mount >> $seqres.full
49 $XFS_QUOTA_PROG -x -c 'state' $SCRATCH_MNT | grep 'grace time'
52 # Run repair to force quota check
53 _scratch_xfs_repair >> $seqres.full 2>&1
55 # Remount (this time to run quotacheck) and check the limits. There's a bug
56 # in quotacheck where we would reset the ondisk default grace period to zero
57 # while the incore copy stays at whatever was read in prior to quotacheck.
58 # This will show up after the /next/ remount.
59 _scratch_mount >> $seqres.full
60 $XFS_QUOTA_PROG -x -c 'state' $SCRATCH_MNT | grep 'grace time'
63 # Remount and check the limits
64 _scratch_mount >> $seqres.full
65 $XFS_QUOTA_PROG -x -c 'state' $SCRATCH_MNT | grep 'grace time'