2 # SPDX-License-Identifier: GPL-2.0
3 # Copyright (c) 2021 Red Hat, Inc. All Rights Reserved.
7 # Regression test for xfsprogs commit d8a94546 ("xfs_quota: state command
8 # should report ugp grace times"). When give "-ugp" or "-a" options to
9 # xfs_quota state command, it should report grace times for all three types
13 _begin_fstest auto quick quota
15 # Import common functions
18 # real QA test starts here
23 # Format filesystem and set up quota limits
24 _scratch_mkfs > $seqres.full
25 _qmount_option "grpquota"
26 _qmount >> $seqres.full
28 $XFS_QUOTA_PROG -x -c 'timer -g 5d' $SCRATCH_MNT
29 # xfs_quota state -ugp or -a should report times for all three types separately.
31 $XFS_QUOTA_PROG -x -c 'state -ugp' $SCRATCH_MNT | grep 'grace time'
33 $XFS_QUOTA_PROG -x -c 'state -a' $SCRATCH_MNT | grep 'grace time'