blob: 332ff16a41a0d3d3dfa89e54c559386fc48cd2da (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
|
#! /bin/bash
# SPDX-License-Identifier: GPL-2.0-or-later
# Copyright (c) 2020, Oracle and/or its affiliates. All Rights Reserved.
#
# FS QA Test No. 518
#
# Make sure that the quota default grace period and maximum warning limits
# survive quotacheck.
. ./common/preamble
_begin_fstest auto quick quota
# Import common functions.
. ./common/filter
. ./common/quota
# real QA test starts here
_supported_fs xfs
_require_scratch
_require_quota
# Format filesystem and set up quota limits
_scratch_mkfs > $seqres.full
_qmount_option "usrquota"
_scratch_mount >> $seqres.full
$XFS_QUOTA_PROG -x -c 'timer -u 300m' $SCRATCH_MNT
$XFS_QUOTA_PROG -x -c 'state -u' $SCRATCH_MNT | grep 'grace time'
_scratch_unmount
# Remount and check the limits
_scratch_mount >> $seqres.full
$XFS_QUOTA_PROG -x -c 'state -u' $SCRATCH_MNT | grep 'grace time'
_scratch_unmount
# Run repair to force quota check
_scratch_xfs_repair >> $seqres.full 2>&1
# Remount (this time to run quotacheck) and check the limits. There's a bug
# in quotacheck where we would reset the ondisk default grace period to zero
# while the incore copy stays at whatever was read in prior to quotacheck.
# This will show up after the /next/ remount.
_scratch_mount >> $seqres.full
$XFS_QUOTA_PROG -x -c 'state -u' $SCRATCH_MNT | grep 'grace time'
_scratch_unmount
# Remount and check the limits
_scratch_mount >> $seqres.full
$XFS_QUOTA_PROG -x -c 'state -u' $SCRATCH_MNT | grep 'grace time'
_scratch_unmount
# success, all done
status=0
exit
|