xfs/220: avoid failure when disabling quota accounting is not supported
authorChristoph Hellwig <hch@lst.de>
Thu, 22 Jul 2021 07:38:29 +0000 (09:38 +0200)
committerEryu Guan <guaneryu@gmail.com>
Sun, 25 Jul 2021 14:45:08 +0000 (22:45 +0800)
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>
Reviewed-by: Darrick J. Wong <djwong@kernel.org>
Signed-off-by: Eryu Guan <guaneryu@gmail.com>
tests/xfs/220

index 8d955225b9195f50582f8d46077fdac9f9dc4be4..c847a0dc6a1cc2c4a0c099b288062c7db14a43e7 100755 (executable)
@@ -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