diff mbox series

[4/6] xfs/220: avoid failure when disabling quota accounting is not supported

Message ID 20210712111146.82734-5-hch@lst.de (mailing list archive)
State New, archived
Headers show
Series [1/6] common/quota: allow removing quota options entirely in _qmount_option | expand

Commit Message

Christoph Hellwig July 12, 2021, 11:11 a.m. UTC
Doing a proper _requires for quotaoff support is rather hard, as we need
to test it on a specific file system.  Instead just use sed to remove
the warning and let the test case pass.  Eventually it should just be
removed entirely.

Signed-off-by: Christoph Hellwig <hch@lst.de>
---
 tests/xfs/220 | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

Comments

Darrick J. Wong July 14, 2021, 11:30 p.m. UTC | #1
On Mon, Jul 12, 2021 at 01:11:44PM +0200, Christoph Hellwig wrote:
> Doing a proper _requires for quotaoff support is rather hard, as we need
> to test it on a specific file system.  Instead just use sed to remove
> the warning and let the test case pass.  Eventually it should just be
> removed entirely.
> 
> Signed-off-by: Christoph Hellwig <hch@lst.de>
> ---
>  tests/xfs/220 | 7 ++++++-
>  1 file changed, 6 insertions(+), 1 deletion(-)
> 
> diff --git a/tests/xfs/220 b/tests/xfs/220
> index 8d955225..c847a0dc 100755
> --- a/tests/xfs/220
> +++ b/tests/xfs/220
> @@ -54,7 +54,12 @@ _scratch_mount -o uquota
>  
>  # turn off quota and remove space allocated to the quota files
>  # (this used to give wrong ENOSYS returns in 2.6.31)
> -xfs_quota -x -c off -c remove $SCRATCH_DEV
> +#
> +# The sed expression below replaces a notrun to cater for kernels that have
> +# removed the ability to disable quota accounting at runtime.  On those
> +# kernel this test is rather useless, and in a few years we can drop it.
> +xfs_quota -x -c off -c remove $SCRATCH_DEV 2>&1 | \

Please replace 'xfs_quota' with '$XFS_QUOTA_PROG' in all these tests
you're touching.

> +	sed -e '/XFS_QUOTARM: Invalid argument/d'

Between 'off' and 'remove', which one returned EINVAL?

--D

>  
>  # and unmount again
>  _scratch_unmount
> -- 
> 2.30.2
>
Christoph Hellwig July 20, 2021, 6:37 a.m. UTC | #2
On Wed, Jul 14, 2021 at 04:30:49PM -0700, Darrick J. Wong wrote:
> > +#
> > +# The sed expression below replaces a notrun to cater for kernels that have
> > +# removed the ability to disable quota accounting at runtime.  On those
> > +# kernel this test is rather useless, and in a few years we can drop it.
> > +xfs_quota -x -c off -c remove $SCRATCH_DEV 2>&1 | \
> 
> Please replace 'xfs_quota' with '$XFS_QUOTA_PROG' in all these tests
> you're touching.
> 
> > +	sed -e '/XFS_QUOTARM: Invalid argument/d'
> 
> Between 'off' and 'remove', which one returned EINVAL?

remove, as the file system is still using the quota files.
diff mbox series

Patch

diff --git a/tests/xfs/220 b/tests/xfs/220
index 8d955225..c847a0dc 100755
--- a/tests/xfs/220
+++ b/tests/xfs/220
@@ -54,7 +54,12 @@  _scratch_mount -o uquota
 
 # turn off quota and remove space allocated to the quota files
 # (this used to give wrong ENOSYS returns in 2.6.31)
-xfs_quota -x -c off -c remove $SCRATCH_DEV
+#
+# The sed expression below replaces a notrun to cater for kernels that have
+# removed the ability to disable quota accounting at runtime.  On those
+# kernel this test is rather useless, and in a few years we can drop it.
+xfs_quota -x -c off -c remove $SCRATCH_DEV 2>&1 | \
+	sed -e '/XFS_QUOTARM: Invalid argument/d'
 
 # and unmount again
 _scratch_unmount