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
37 # Format filesystem and set up quota limits
38 _scratch_mkfs > $seqres.full
39 _qmount_option "usrquota"
40 _scratch_mount >> $seqres.full
42 $XFS_QUOTA_PROG -x -c 'timer -u 300m' $SCRATCH_MNT
43 $XFS_QUOTA_PROG -x -c 'state' $SCRATCH_MNT | grep 'grace time'
46 # Remount and check the limits
47 _scratch_mount >> $seqres.full
48 $XFS_QUOTA_PROG -x -c 'state' $SCRATCH_MNT | grep 'grace time'
51 # Run repair to force quota check
52 _scratch_xfs_repair >> $seqres.full 2>&1
54 # Remount (this time to run quotacheck) and check the limits. There's a bug
55 # in quotacheck where we would reset the ondisk default grace period to zero
56 # while the incore copy stays at whatever was read in prior to quotacheck.
57 # This will show up after the /next/ remount.
58 _scratch_mount >> $seqres.full
59 $XFS_QUOTA_PROG -x -c 'state' $SCRATCH_MNT | grep 'grace time'
62 # Remount and check the limits
63 _scratch_mount >> $seqres.full
64 $XFS_QUOTA_PROG -x -c 'state' $SCRATCH_MNT | grep 'grace time'