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 _begin_fstest auto quick quota
13 # Import common functions.
17 # real QA test starts here
22 # Format filesystem and set up quota limits
23 _scratch_mkfs > $seqres.full
24 _qmount_option "usrquota"
25 _scratch_mount >> $seqres.full
27 $XFS_QUOTA_PROG -x -c 'timer -u 300m' $SCRATCH_MNT
28 $XFS_QUOTA_PROG -x -c 'state -u' $SCRATCH_MNT | grep 'grace time'
31 # Remount and check the limits
32 _scratch_mount >> $seqres.full
33 $XFS_QUOTA_PROG -x -c 'state -u' $SCRATCH_MNT | grep 'grace time'
36 # Run repair to force quota check
37 _scratch_xfs_repair >> $seqres.full 2>&1
39 # Remount (this time to run quotacheck) and check the limits. There's a bug
40 # in quotacheck where we would reset the ondisk default grace period to zero
41 # while the incore copy stays at whatever was read in prior to quotacheck.
42 # This will show up after the /next/ remount.
43 _scratch_mount >> $seqres.full
44 $XFS_QUOTA_PROG -x -c 'state -u' $SCRATCH_MNT | grep 'grace time'
47 # Remount and check the limits
48 _scratch_mount >> $seqres.full
49 $XFS_QUOTA_PROG -x -c 'state -u' $SCRATCH_MNT | grep 'grace time'