* [PATCH] xfs: quota state command should report upg grace times separately
@ 2021-08-06 5:10 Zorro Lang
2021-08-06 18:59 ` Darrick J. Wong
2021-08-08 14:35 ` Eryu Guan
0 siblings, 2 replies; 5+ messages in thread
From: Zorro Lang @ 2021-08-06 5:10 UTC (permalink / raw)
To: fstests
Regression test for d8a94546 ("xfs_quota: state command should report
ugp grace times"). When give "-ugp" or "-a" options to xfs_quota
state command, it should report grace times for all three types
separately.
Signed-off-by: Zorro Lang <zlang@redhat.com>
---
tests/xfs/175 | 33 +++++++++++++++++++++++++++++++++
tests/xfs/175.out | 21 +++++++++++++++++++++
2 files changed, 54 insertions(+)
create mode 100755 tests/xfs/175
create mode 100644 tests/xfs/175.out
diff --git a/tests/xfs/175 b/tests/xfs/175
new file mode 100755
index 00000000..0b7d81ec
--- /dev/null
+++ b/tests/xfs/175
@@ -0,0 +1,33 @@
+#! /bin/bash
+# SPDX-License-Identifier: GPL-2.0
+# Copyright (c) 2021 Red Hat, Inc. All Rights Reserved.
+#
+# FS QA Test 175
+#
+# Regression test for d8a94546 ("xfs_quota: state command should report
+# ugp grace times"). When give "-ugp" or "-a" options to xfs_quota state
+# command, it should report grace times for all three types separately.
+#
+. ./common/preamble
+_begin_fstest auto quick 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 "grpquota"
+_scratch_mount >> $seqres.full
+
+$XFS_QUOTA_PROG -x -c 'timer -u 5d' $SCRATCH_MNT
+# xfs_quota state -ugp or -a should report times for all three types separately.
+echo "* state -ugp:"
+$XFS_QUOTA_PROG -x -c 'state -ugp' $SCRATCH_MNT | grep 'grace time'
+echo "* state -a:"
+$XFS_QUOTA_PROG -x -c 'state -a' $SCRATCH_MNT | grep 'grace time'
+
+# success, all done
+status=0
+exit
diff --git a/tests/xfs/175.out b/tests/xfs/175.out
new file mode 100644
index 00000000..83247e21
--- /dev/null
+++ b/tests/xfs/175.out
@@ -0,0 +1,21 @@
+QA output created by 175
+* state -ugp:
+Blocks grace time: [--------]
+Inodes grace time: [--------]
+Realtime Blocks grace time: [--------]
+Blocks grace time: [5 days]
+Inodes grace time: [5 days]
+Realtime Blocks grace time: [5 days]
+Blocks grace time: [--------]
+Inodes grace time: [--------]
+Realtime Blocks grace time: [--------]
+* state -a:
+Blocks grace time: [--------]
+Inodes grace time: [--------]
+Realtime Blocks grace time: [--------]
+Blocks grace time: [5 days]
+Inodes grace time: [5 days]
+Realtime Blocks grace time: [5 days]
+Blocks grace time: [--------]
+Inodes grace time: [--------]
+Realtime Blocks grace time: [--------]
--
2.31.1
^ permalink raw reply related [flat|nested] 5+ messages in thread* Re: [PATCH] xfs: quota state command should report upg grace times separately 2021-08-06 5:10 [PATCH] xfs: quota state command should report upg grace times separately Zorro Lang @ 2021-08-06 18:59 ` Darrick J. Wong 2021-08-08 14:11 ` Eryu Guan 2021-08-08 14:35 ` Eryu Guan 1 sibling, 1 reply; 5+ messages in thread From: Darrick J. Wong @ 2021-08-06 18:59 UTC (permalink / raw) To: Zorro Lang; +Cc: fstests On Fri, Aug 06, 2021 at 01:10:12PM +0800, Zorro Lang wrote: > Regression test for d8a94546 ("xfs_quota: state command should report > ugp grace times"). When give "-ugp" or "-a" options to xfs_quota > state command, it should report grace times for all three types > separately. > > Signed-off-by: Zorro Lang <zlang@redhat.com> > --- > tests/xfs/175 | 33 +++++++++++++++++++++++++++++++++ > tests/xfs/175.out | 21 +++++++++++++++++++++ > 2 files changed, 54 insertions(+) > create mode 100755 tests/xfs/175 > create mode 100644 tests/xfs/175.out > > diff --git a/tests/xfs/175 b/tests/xfs/175 > new file mode 100755 > index 00000000..0b7d81ec > --- /dev/null > +++ b/tests/xfs/175 > @@ -0,0 +1,33 @@ > +#! /bin/bash > +# SPDX-License-Identifier: GPL-2.0 > +# Copyright (c) 2021 Red Hat, Inc. All Rights Reserved. > +# > +# FS QA Test 175 > +# > +# Regression test for d8a94546 ("xfs_quota: state command should report Might be worth saying explicitly that this is an xfsprogs commit. > +# ugp grace times"). When give "-ugp" or "-a" options to xfs_quota state > +# command, it should report grace times for all three types separately. > +# > +. ./common/preamble > +_begin_fstest auto quick 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 "grpquota" > +_scratch_mount >> $seqres.full > + > +$XFS_QUOTA_PROG -x -c 'timer -u 5d' $SCRATCH_MNT > +# xfs_quota state -ugp or -a should report times for all three types separately. > +echo "* state -ugp:" > +$XFS_QUOTA_PROG -x -c 'state -ugp' $SCRATCH_MNT | grep 'grace time' > +echo "* state -a:" > +$XFS_QUOTA_PROG -x -c 'state -a' $SCRATCH_MNT | grep 'grace time' Logic looks fine to me. With the comment fixed, Reviewed-by: Darrick J. Wong <djwong@kernel.org> --D > + > +# success, all done > +status=0 > +exit > diff --git a/tests/xfs/175.out b/tests/xfs/175.out > new file mode 100644 > index 00000000..83247e21 > --- /dev/null > +++ b/tests/xfs/175.out > @@ -0,0 +1,21 @@ > +QA output created by 175 > +* state -ugp: > +Blocks grace time: [--------] > +Inodes grace time: [--------] > +Realtime Blocks grace time: [--------] > +Blocks grace time: [5 days] > +Inodes grace time: [5 days] > +Realtime Blocks grace time: [5 days] > +Blocks grace time: [--------] > +Inodes grace time: [--------] > +Realtime Blocks grace time: [--------] > +* state -a: > +Blocks grace time: [--------] > +Inodes grace time: [--------] > +Realtime Blocks grace time: [--------] > +Blocks grace time: [5 days] > +Inodes grace time: [5 days] > +Realtime Blocks grace time: [5 days] > +Blocks grace time: [--------] > +Inodes grace time: [--------] > +Realtime Blocks grace time: [--------] > -- > 2.31.1 > ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] xfs: quota state command should report upg grace times separately 2021-08-06 18:59 ` Darrick J. Wong @ 2021-08-08 14:11 ` Eryu Guan 0 siblings, 0 replies; 5+ messages in thread From: Eryu Guan @ 2021-08-08 14:11 UTC (permalink / raw) To: Darrick J. Wong; +Cc: Zorro Lang, fstests On Fri, Aug 06, 2021 at 11:59:10AM -0700, Darrick J. Wong wrote: > On Fri, Aug 06, 2021 at 01:10:12PM +0800, Zorro Lang wrote: > > Regression test for d8a94546 ("xfs_quota: state command should report > > ugp grace times"). When give "-ugp" or "-a" options to xfs_quota > > state command, it should report grace times for all three types > > separately. > > > > Signed-off-by: Zorro Lang <zlang@redhat.com> > > --- > > tests/xfs/175 | 33 +++++++++++++++++++++++++++++++++ > > tests/xfs/175.out | 21 +++++++++++++++++++++ > > 2 files changed, 54 insertions(+) > > create mode 100755 tests/xfs/175 > > create mode 100644 tests/xfs/175.out > > > > diff --git a/tests/xfs/175 b/tests/xfs/175 > > new file mode 100755 > > index 00000000..0b7d81ec > > --- /dev/null > > +++ b/tests/xfs/175 > > @@ -0,0 +1,33 @@ > > +#! /bin/bash > > +# SPDX-License-Identifier: GPL-2.0 > > +# Copyright (c) 2021 Red Hat, Inc. All Rights Reserved. > > +# > > +# FS QA Test 175 > > +# > > +# Regression test for d8a94546 ("xfs_quota: state command should report > > Might be worth saying explicitly that this is an xfsprogs commit. I'll fix that on commit, Zorro, there's no need to resend. > > > +# ugp grace times"). When give "-ugp" or "-a" options to xfs_quota state > > +# command, it should report grace times for all three types separately. > > +# > > +. ./common/preamble > > +_begin_fstest auto quick 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 "grpquota" > > +_scratch_mount >> $seqres.full > > + > > +$XFS_QUOTA_PROG -x -c 'timer -u 5d' $SCRATCH_MNT > > +# xfs_quota state -ugp or -a should report times for all three types separately. > > +echo "* state -ugp:" > > +$XFS_QUOTA_PROG -x -c 'state -ugp' $SCRATCH_MNT | grep 'grace time' > > +echo "* state -a:" > > +$XFS_QUOTA_PROG -x -c 'state -a' $SCRATCH_MNT | grep 'grace time' > > Logic looks fine to me. > > With the comment fixed, > Reviewed-by: Darrick J. Wong <djwong@kernel.org> Thanks for review! Eryu > > --D > > > + > > +# success, all done > > +status=0 > > +exit > > diff --git a/tests/xfs/175.out b/tests/xfs/175.out > > new file mode 100644 > > index 00000000..83247e21 > > --- /dev/null > > +++ b/tests/xfs/175.out > > @@ -0,0 +1,21 @@ > > +QA output created by 175 > > +* state -ugp: > > +Blocks grace time: [--------] > > +Inodes grace time: [--------] > > +Realtime Blocks grace time: [--------] > > +Blocks grace time: [5 days] > > +Inodes grace time: [5 days] > > +Realtime Blocks grace time: [5 days] > > +Blocks grace time: [--------] > > +Inodes grace time: [--------] > > +Realtime Blocks grace time: [--------] > > +* state -a: > > +Blocks grace time: [--------] > > +Inodes grace time: [--------] > > +Realtime Blocks grace time: [--------] > > +Blocks grace time: [5 days] > > +Inodes grace time: [5 days] > > +Realtime Blocks grace time: [5 days] > > +Blocks grace time: [--------] > > +Inodes grace time: [--------] > > +Realtime Blocks grace time: [--------] > > -- > > 2.31.1 > > ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] xfs: quota state command should report upg grace times separately 2021-08-06 5:10 [PATCH] xfs: quota state command should report upg grace times separately Zorro Lang 2021-08-06 18:59 ` Darrick J. Wong @ 2021-08-08 14:35 ` Eryu Guan 2021-08-08 15:44 ` Zorro Lang 1 sibling, 1 reply; 5+ messages in thread From: Eryu Guan @ 2021-08-08 14:35 UTC (permalink / raw) To: Zorro Lang; +Cc: fstests On Fri, Aug 06, 2021 at 01:10:12PM +0800, Zorro Lang wrote: > Regression test for d8a94546 ("xfs_quota: state command should report > ugp grace times"). When give "-ugp" or "-a" options to xfs_quota > state command, it should report grace times for all three types > separately. > > Signed-off-by: Zorro Lang <zlang@redhat.com> > --- > tests/xfs/175 | 33 +++++++++++++++++++++++++++++++++ > tests/xfs/175.out | 21 +++++++++++++++++++++ > 2 files changed, 54 insertions(+) > create mode 100755 tests/xfs/175 > create mode 100644 tests/xfs/175.out > > diff --git a/tests/xfs/175 b/tests/xfs/175 > new file mode 100755 > index 00000000..0b7d81ec > --- /dev/null > +++ b/tests/xfs/175 > @@ -0,0 +1,33 @@ > +#! /bin/bash > +# SPDX-License-Identifier: GPL-2.0 > +# Copyright (c) 2021 Red Hat, Inc. All Rights Reserved. > +# > +# FS QA Test 175 > +# > +# Regression test for d8a94546 ("xfs_quota: state command should report > +# ugp grace times"). When give "-ugp" or "-a" options to xfs_quota state > +# command, it should report grace times for all three types separately. > +# > +. ./common/preamble > +_begin_fstest auto quick quota Should source ./common/quota here > + > +# 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 "grpquota" > +_scratch_mount >> $seqres.full s/_scratch_mount/_qmount/ > + > +$XFS_QUOTA_PROG -x -c 'timer -u 5d' $SCRATCH_MNT Should set group quota timer, as we only enable grpquota above, otherwise we hit "xfs_quota: cannot set timer: No such process" failre here. I fixed all on commit. Thanks, Eryu > +# xfs_quota state -ugp or -a should report times for all three types separately. > +echo "* state -ugp:" > +$XFS_QUOTA_PROG -x -c 'state -ugp' $SCRATCH_MNT | grep 'grace time' > +echo "* state -a:" > +$XFS_QUOTA_PROG -x -c 'state -a' $SCRATCH_MNT | grep 'grace time' > + > +# success, all done > +status=0 > +exit > diff --git a/tests/xfs/175.out b/tests/xfs/175.out > new file mode 100644 > index 00000000..83247e21 > --- /dev/null > +++ b/tests/xfs/175.out > @@ -0,0 +1,21 @@ > +QA output created by 175 > +* state -ugp: > +Blocks grace time: [--------] > +Inodes grace time: [--------] > +Realtime Blocks grace time: [--------] > +Blocks grace time: [5 days] > +Inodes grace time: [5 days] > +Realtime Blocks grace time: [5 days] > +Blocks grace time: [--------] > +Inodes grace time: [--------] > +Realtime Blocks grace time: [--------] > +* state -a: > +Blocks grace time: [--------] > +Inodes grace time: [--------] > +Realtime Blocks grace time: [--------] > +Blocks grace time: [5 days] > +Inodes grace time: [5 days] > +Realtime Blocks grace time: [5 days] > +Blocks grace time: [--------] > +Inodes grace time: [--------] > +Realtime Blocks grace time: [--------] > -- > 2.31.1 ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] xfs: quota state command should report upg grace times separately 2021-08-08 14:35 ` Eryu Guan @ 2021-08-08 15:44 ` Zorro Lang 0 siblings, 0 replies; 5+ messages in thread From: Zorro Lang @ 2021-08-08 15:44 UTC (permalink / raw) To: Eryu Guan; +Cc: fstests On Sun, Aug 08, 2021 at 10:35:53PM +0800, Eryu Guan wrote: > On Fri, Aug 06, 2021 at 01:10:12PM +0800, Zorro Lang wrote: > > Regression test for d8a94546 ("xfs_quota: state command should report > > ugp grace times"). When give "-ugp" or "-a" options to xfs_quota > > state command, it should report grace times for all three types > > separately. > > > > Signed-off-by: Zorro Lang <zlang@redhat.com> > > --- > > tests/xfs/175 | 33 +++++++++++++++++++++++++++++++++ > > tests/xfs/175.out | 21 +++++++++++++++++++++ > > 2 files changed, 54 insertions(+) > > create mode 100755 tests/xfs/175 > > create mode 100644 tests/xfs/175.out > > > > diff --git a/tests/xfs/175 b/tests/xfs/175 > > new file mode 100755 > > index 00000000..0b7d81ec > > --- /dev/null > > +++ b/tests/xfs/175 > > @@ -0,0 +1,33 @@ > > +#! /bin/bash > > +# SPDX-License-Identifier: GPL-2.0 > > +# Copyright (c) 2021 Red Hat, Inc. All Rights Reserved. > > +# > > +# FS QA Test 175 > > +# > > +# Regression test for d8a94546 ("xfs_quota: state command should report > > +# ugp grace times"). When give "-ugp" or "-a" options to xfs_quota state > > +# command, it should report grace times for all three types separately. > > +# > > +. ./common/preamble > > +_begin_fstest auto quick quota > > Should source ./common/quota here > > > + > > +# 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 "grpquota" > > +_scratch_mount >> $seqres.full > > s/_scratch_mount/_qmount/ > > > + > > +$XFS_QUOTA_PROG -x -c 'timer -u 5d' $SCRATCH_MNT > > Should set group quota timer, as we only enable grpquota above, > otherwise we hit "xfs_quota: cannot set timer: No such process" failre > here. > > I fixed all on commit. Sorry, I forgot to commit below changes[1] in my local git repo, before sending this patch ... It's still staged ... Sorry about that, if you haven't merged this patch, I can send a V2. Thanks, Zorro [1] [zorro@zlang-laptop xfstests-dev]$ git diff diff --git a/tests/xfs/175 b/tests/xfs/175 index 0b7d81ec..2cd38842 100755 --- a/tests/xfs/175 +++ b/tests/xfs/175 @@ -11,6 +11,8 @@ . ./common/preamble _begin_fstest auto quick quota +. ./common/quota + # real QA test starts here _supported_fs xfs _require_scratch @@ -21,7 +23,7 @@ _scratch_mkfs > $seqres.full _qmount_option "grpquota" _scratch_mount >> $seqres.full -$XFS_QUOTA_PROG -x -c 'timer -u 5d' $SCRATCH_MNT +$XFS_QUOTA_PROG -x -c 'timer -g 5d' $SCRATCH_MNT > > Thanks, > Eryu > > > +# xfs_quota state -ugp or -a should report times for all three types separately. > > +echo "* state -ugp:" > > +$XFS_QUOTA_PROG -x -c 'state -ugp' $SCRATCH_MNT | grep 'grace time' > > +echo "* state -a:" > > +$XFS_QUOTA_PROG -x -c 'state -a' $SCRATCH_MNT | grep 'grace time' > > + > > +# success, all done > > +status=0 > > +exit > > diff --git a/tests/xfs/175.out b/tests/xfs/175.out > > new file mode 100644 > > index 00000000..83247e21 > > --- /dev/null > > +++ b/tests/xfs/175.out > > @@ -0,0 +1,21 @@ > > +QA output created by 175 > > +* state -ugp: > > +Blocks grace time: [--------] > > +Inodes grace time: [--------] > > +Realtime Blocks grace time: [--------] > > +Blocks grace time: [5 days] > > +Inodes grace time: [5 days] > > +Realtime Blocks grace time: [5 days] > > +Blocks grace time: [--------] > > +Inodes grace time: [--------] > > +Realtime Blocks grace time: [--------] > > +* state -a: > > +Blocks grace time: [--------] > > +Inodes grace time: [--------] > > +Realtime Blocks grace time: [--------] > > +Blocks grace time: [5 days] > > +Inodes grace time: [5 days] > > +Realtime Blocks grace time: [5 days] > > +Blocks grace time: [--------] > > +Inodes grace time: [--------] > > +Realtime Blocks grace time: [--------] > > -- > > 2.31.1 > ^ permalink raw reply related [flat|nested] 5+ messages in thread
end of thread, other threads:[~2021-08-08 15:43 UTC | newest] Thread overview: 5+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2021-08-06 5:10 [PATCH] xfs: quota state command should report upg grace times separately Zorro Lang 2021-08-06 18:59 ` Darrick J. Wong 2021-08-08 14:11 ` Eryu Guan 2021-08-08 14:35 ` Eryu Guan 2021-08-08 15:44 ` Zorro Lang
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.