From: "Darrick J. Wong" <djwong@kernel.org>
To: Christoph Hellwig <hch@lst.de>
Cc: fstests@vger.kernel.org, linux-xfs@vger.kernel.org
Subject: Re: [PATCH 3/6] xfs/106: don't test disabling quota accounting
Date: Wed, 14 Jul 2021 16:37:52 -0700 [thread overview]
Message-ID: <20210714233752.GR22402@magnolia> (raw)
In-Reply-To: <20210712111146.82734-4-hch@lst.de>
On Mon, Jul 12, 2021 at 01:11:43PM +0200, Christoph Hellwig wrote:
> Switch the test that removes the quota files to just disable
> enforcement and then unmount the file system as disabling quota
> accounting is about to go away.
>
> Signed-off-by: Christoph Hellwig <hch@lst.de>
> ---
> tests/xfs/106 | 45 ++++++++++++++++++-------------------
> tests/xfs/106.out | 57 +++++++++++++++++++++++++++++++++++++++--------
> 2 files changed, 70 insertions(+), 32 deletions(-)
>
> diff --git a/tests/xfs/106 b/tests/xfs/106
> index f1397f94..5f0512d6 100755
> --- a/tests/xfs/106
> +++ b/tests/xfs/106
> @@ -153,13 +153,6 @@ test_enable()
> -c "enable -$type -v" $SCRATCH_MNT | filter_state
> }
>
> -test_off()
> -{
> - echo "checking off command (type=$type)"
> - $XFS_QUOTA_PROG -D $tmp.projects -P $tmp.projid -x \
> - -c "off -$type -v" $SCRATCH_MNT | _filter_scratch
> -}
> -
> test_remove()
> {
> echo "checking remove command (type=$type)"
> @@ -194,6 +187,15 @@ test_restore()
>
> test_xfs_quota()
> {
> + _qmount_option $1
> + _qmount
> +
> + if [ $type == "p" ]; then
> + _require_prjquota $SCRATCH_DEV
> + $XFS_QUOTA_PROG -D $tmp.projects -P $tmp.projid -x \
> + -c "project -s $id" $SCRATCH_MNT > /dev/null
> + fi
> +
> # init quota
> echo "init quota limit and timer, and dump it"
> echo "create_files 1024k 15"; create_files 1024k 15
> @@ -236,14 +238,21 @@ test_xfs_quota()
> echo ; test_report -N
>
> # off and remove test
> - echo "off and remove test"
> + echo "disable and remove test"
> echo ; test_limit 100m 100m 100 100
> echo ; test_quota -N
> - echo ; test_off
> + echo ; test_disable
> echo ; test_state
> + _scratch_unmount
> + _qmount_option ""
> + _qmount
Why not make these three lines the method body of test_off() ?
--D
> echo ; test_remove
> echo ; test_report -N
> - echo "quota remount"; _qmount
> + _scratch_unmount
> +
> + echo "quota remount";
> + _qmount_option $1
> + _qmount
> echo ; test_report -N
>
> # restore test
> @@ -255,33 +264,23 @@ test_xfs_quota()
> }
>
> echo "----------------------- uquota,sync ---------------------------"
> -_qmount_option "uquota,sync"
> -_qmount
> type=u
> id=$uqid
> -test_xfs_quota
> +test_xfs_quota "uquota,sync"
>
> echo "----------------------- gquota,sync ---------------------------"
> -_qmount_option "gquota,sync"
> -_qmount
> type=g
> id=$gqid
> -test_xfs_quota
> +test_xfs_quota "gquota,sync"
>
> echo "----------------------- pquota,sync ---------------------------"
> # Need to clean the group quota before test project quota, because
> # V4 xfs doesn't support separate project inode. So mkfs at here.
> _scratch_unmount
> _scratch_mkfs_xfs >>$seqres.full 2>&1
> -_qmount_option "pquota,sync"
> -_qmount
> type=p
> id=$pqid
> -_require_prjquota $SCRATCH_DEV
> -$XFS_QUOTA_PROG -D $tmp.projects -P $tmp.projid -x \
> - -c "project -s $id" \
> - $SCRATCH_MNT > /dev/null
> -test_xfs_quota
> +test_xfs_quota "pquota,sync"
>
> _scratch_unmount
> # success, all done
> diff --git a/tests/xfs/106.out b/tests/xfs/106.out
> index e36375d3..2af17bc9 100644
> --- a/tests/xfs/106.out
> +++ b/tests/xfs/106.out
> @@ -124,17 +124,30 @@ Realtime Blocks grace time: [7 days]
> checking report command (type=u)
> fsgqa 1024 512 2048 00 [3 days] 15 10 20 00 [3 days]
>
> -off and remove test
> +disable and remove test
>
> checking limit command (type=u, bsoft=100m, bhard=100m, isoft=100, ihard=100)
>
> checking quota command (type=u)
> SCRATCH_DEV 1024 102400 102400 00 [--------] 15 100 100 00 [--------] SCRATCH_MNT
>
> -checking off command (type=u)
> -User quota are not enabled on SCRATCH_DEV
> +checking disable command (type=u)
> +User quota state on SCRATCH_MNT (SCRATCH_DEV)
> + Accounting: ON
> + Enforcement: OFF
> + Inode: #[INO] (X blocks, Y extents)
> +Blocks grace time: [3 days]
> +Inodes grace time: [3 days]
> +Realtime Blocks grace time: [7 days]
>
> checking state command (type=u)
> +User quota state on SCRATCH_MNT (SCRATCH_DEV)
> + Accounting: ON
> + Enforcement: OFF
> + Inode: #[INO] (X blocks, Y extents)
> +Blocks grace time: [3 days]
> +Inodes grace time: [3 days]
> +Realtime Blocks grace time: [7 days]
>
> checking remove command (type=u)
> User quota are not enabled on SCRATCH_DEV
> @@ -288,17 +301,30 @@ Realtime Blocks grace time: [7 days]
> checking report command (type=g)
> fsgqa 1024 512 2048 00 [3 days] 15 10 20 00 [3 days]
>
> -off and remove test
> +disable and remove test
>
> checking limit command (type=g, bsoft=100m, bhard=100m, isoft=100, ihard=100)
>
> checking quota command (type=g)
> SCRATCH_DEV 1024 102400 102400 00 [--------] 15 100 100 00 [--------] SCRATCH_MNT
>
> -checking off command (type=g)
> -Group quota are not enabled on SCRATCH_DEV
> +checking disable command (type=g)
> +Group quota state on SCRATCH_MNT (SCRATCH_DEV)
> + Accounting: ON
> + Enforcement: OFF
> + Inode: #[INO] (X blocks, Y extents)
> +Blocks grace time: [3 days]
> +Inodes grace time: [3 days]
> +Realtime Blocks grace time: [7 days]
>
> checking state command (type=g)
> +Group quota state on SCRATCH_MNT (SCRATCH_DEV)
> + Accounting: ON
> + Enforcement: OFF
> + Inode: #[INO] (X blocks, Y extents)
> +Blocks grace time: [3 days]
> +Inodes grace time: [3 days]
> +Realtime Blocks grace time: [7 days]
>
> checking remove command (type=g)
> Group quota are not enabled on SCRATCH_DEV
> @@ -452,17 +478,30 @@ Realtime Blocks grace time: [7 days]
> checking report command (type=p)
> fsgqa 1024 512 2048 00 [3 days] 15 10 20 00 [3 days]
>
> -off and remove test
> +disable and remove test
>
> checking limit command (type=p, bsoft=100m, bhard=100m, isoft=100, ihard=100)
>
> checking quota command (type=p)
> SCRATCH_DEV 1024 102400 102400 00 [--------] 15 100 100 00 [--------] SCRATCH_MNT
>
> -checking off command (type=p)
> -Project quota are not enabled on SCRATCH_DEV
> +checking disable command (type=p)
> +Project quota state on SCRATCH_MNT (SCRATCH_DEV)
> + Accounting: ON
> + Enforcement: OFF
> + Inode: #[INO] (X blocks, Y extents)
> +Blocks grace time: [3 days]
> +Inodes grace time: [3 days]
> +Realtime Blocks grace time: [7 days]
>
> checking state command (type=p)
> +Project quota state on SCRATCH_MNT (SCRATCH_DEV)
> + Accounting: ON
> + Enforcement: OFF
> + Inode: #[INO] (X blocks, Y extents)
> +Blocks grace time: [3 days]
> +Inodes grace time: [3 days]
> +Realtime Blocks grace time: [7 days]
>
> checking remove command (type=p)
> Project quota are not enabled on SCRATCH_DEV
> --
> 2.30.2
>
next prev parent reply other threads:[~2021-07-14 23:37 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-07-12 11:11 prepare for removing support to disable quota accounting Christoph Hellwig
2021-07-12 11:11 ` [PATCH 1/6] common/quota: allow removing quota options entirely in _qmount_option Christoph Hellwig
2021-07-14 23:35 ` Darrick J. Wong
2021-07-12 11:11 ` [PATCH 2/6] xfs/007: unmount after disabling quota Christoph Hellwig
2021-07-14 23:35 ` Darrick J. Wong
2021-07-12 11:11 ` [PATCH 3/6] xfs/106: don't test disabling quota accounting Christoph Hellwig
2021-07-14 23:37 ` Darrick J. Wong [this message]
2021-07-12 11:11 ` [PATCH 4/6] xfs/220: avoid failure when disabling quota accounting is not supported Christoph Hellwig
2021-07-14 23:30 ` Darrick J. Wong
2021-07-20 6:37 ` Christoph Hellwig
2021-07-12 11:11 ` [PATCH 5/6] xfs/304: don't turn quota accounting off Christoph Hellwig
2021-07-14 23:29 ` Darrick J. Wong
2021-07-12 11:11 ` [PATCH 6/6] xfs/305: " Christoph Hellwig
2021-07-14 23:28 ` Darrick J. Wong
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20210714233752.GR22402@magnolia \
--to=djwong@kernel.org \
--cc=fstests@vger.kernel.org \
--cc=hch@lst.de \
--cc=linux-xfs@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).