generic: test MADV_POPULATE_READ with IO errors
[xfstests-dev.git] / tests / xfs / 175
1 #! /bin/bash
2 # SPDX-License-Identifier: GPL-2.0
3 # Copyright (c) 2021 Red Hat, Inc.  All Rights Reserved.
4 #
5 # FS QA Test 175
6 #
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
10 # separately.
11 #
12 . ./common/preamble
13 _begin_fstest auto quick quota
14
15 # Import common functions
16 . ./common/quota
17
18 # real QA test starts here
19 _supported_fs xfs
20 _require_scratch
21 _require_quota
22
23 # Format filesystem and set up quota limits
24 _scratch_mkfs > $seqres.full
25 _qmount_option "grpquota"
26 _qmount >> $seqres.full
27
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.
30 echo "* state -ugp:"
31 $XFS_QUOTA_PROG -x -c 'state -ugp' $SCRATCH_MNT | grep 'grace time'
32 echo "* state -a:"
33 $XFS_QUOTA_PROG -x -c 'state -a' $SCRATCH_MNT | grep 'grace time'
34
35 # success, all done
36 status=0
37 exit