FSTests Archive on lore.kernel.org
 help / color / Atom feed
* [PATCH] fstests: Do not execute xfs/{532,533,538} when realtime feature is enabled
@ 2021-04-05  7:44 Chandan Babu R
  2021-04-07 16:12 ` Darrick J. Wong
  0 siblings, 1 reply; 2+ messages in thread
From: Chandan Babu R @ 2021-04-05  7:44 UTC (permalink / raw)
  To: fstests; +Cc: Chandan Babu R, linux-xfs, djwong

The minimum length space allocator (i.e. xfs_bmap_exact_minlen_extent_alloc())
depends on the underlying filesystem to be fragmented so that there are enough
one block sized extents available to satify space allocation requests.

xfs/{532,533,538} tests issue space allocation requests for metadata (e.g. for
blocks holding directory and xattr information). With realtime filesystem
instances, these tests would end up fragmenting the space on realtime
device. Hence minimum length space allocator fails since the regular
filesystem space is not fragmented and hence there are no one block sized
extents available.

Thus, this commit disables execution of xfs/{532,533,538} when realtime
feature is enabled on the filesystem instance.

Reported-by: Darrick J. Wong <djwong@kernel.org>
Signed-off-by: Chandan Babu R <chandanrlinux@gmail.com>
---
 tests/xfs/532 | 1 +
 tests/xfs/533 | 1 +
 tests/xfs/538 | 1 +
 3 files changed, 3 insertions(+)

diff --git a/tests/xfs/532 b/tests/xfs/532
index 2bed574a..5359add5 100755
--- a/tests/xfs/532
+++ b/tests/xfs/532
@@ -37,6 +37,7 @@ _supported_fs xfs
 _require_scratch
 _require_attrs
 _require_xfs_debug
+_require_no_realtime
 _require_test_program "punch-alternating"
 _require_xfs_io_error_injection "reduce_max_iextents"
 _require_xfs_io_error_injection "bmap_alloc_minlen_extent"
diff --git a/tests/xfs/533 b/tests/xfs/533
index be909fcc..4826cccc 100755
--- a/tests/xfs/533
+++ b/tests/xfs/533
@@ -35,6 +35,7 @@ rm -f $seqres.full
 _supported_fs xfs
 _require_scratch
 _require_xfs_debug
+_require_no_realtime
 _require_test_program "punch-alternating"
 _require_xfs_io_error_injection "reduce_max_iextents"
 _require_xfs_io_error_injection "bmap_alloc_minlen_extent"
diff --git a/tests/xfs/538 b/tests/xfs/538
index 90eb1637..53a2c060 100755
--- a/tests/xfs/538
+++ b/tests/xfs/538
@@ -35,6 +35,7 @@ rm -f $seqres.full
 _supported_fs xfs
 _require_scratch
 _require_xfs_debug
+_require_no_realtime
 _require_test_program "punch-alternating"
 _require_xfs_io_error_injection "bmap_alloc_minlen_extent"
 
-- 
2.29.2


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] fstests: Do not execute xfs/{532,533,538} when realtime feature is enabled
  2021-04-05  7:44 [PATCH] fstests: Do not execute xfs/{532,533,538} when realtime feature is enabled Chandan Babu R
@ 2021-04-07 16:12 ` Darrick J. Wong
  0 siblings, 0 replies; 2+ messages in thread
From: Darrick J. Wong @ 2021-04-07 16:12 UTC (permalink / raw)
  To: Chandan Babu R; +Cc: fstests, linux-xfs

On Mon, Apr 05, 2021 at 01:14:47PM +0530, Chandan Babu R wrote:
> The minimum length space allocator (i.e. xfs_bmap_exact_minlen_extent_alloc())
> depends on the underlying filesystem to be fragmented so that there are enough
> one block sized extents available to satify space allocation requests.
> 
> xfs/{532,533,538} tests issue space allocation requests for metadata (e.g. for
> blocks holding directory and xattr information). With realtime filesystem
> instances, these tests would end up fragmenting the space on realtime
> device. Hence minimum length space allocator fails since the regular
> filesystem space is not fragmented and hence there are no one block sized
> extents available.
> 
> Thus, this commit disables execution of xfs/{532,533,538} when realtime
> feature is enabled on the filesystem instance.
> 
> Reported-by: Darrick J. Wong <djwong@kernel.org>
> Signed-off-by: Chandan Babu R <chandanrlinux@gmail.com>
> ---
>  tests/xfs/532 | 1 +
>  tests/xfs/533 | 1 +
>  tests/xfs/538 | 1 +
>  3 files changed, 3 insertions(+)
> 
> diff --git a/tests/xfs/532 b/tests/xfs/532
> index 2bed574a..5359add5 100755
> --- a/tests/xfs/532
> +++ b/tests/xfs/532
> @@ -37,6 +37,7 @@ _supported_fs xfs
>  _require_scratch
>  _require_attrs
>  _require_xfs_debug
> +_require_no_realtime

Alternately, you could do:

	$XFS_IO_PROG -c 'chattr -t' $SCRATCH_MNT

and not reduce test coverage.

--D

>  _require_test_program "punch-alternating"
>  _require_xfs_io_error_injection "reduce_max_iextents"
>  _require_xfs_io_error_injection "bmap_alloc_minlen_extent"
> diff --git a/tests/xfs/533 b/tests/xfs/533
> index be909fcc..4826cccc 100755
> --- a/tests/xfs/533
> +++ b/tests/xfs/533
> @@ -35,6 +35,7 @@ rm -f $seqres.full
>  _supported_fs xfs
>  _require_scratch
>  _require_xfs_debug
> +_require_no_realtime
>  _require_test_program "punch-alternating"
>  _require_xfs_io_error_injection "reduce_max_iextents"
>  _require_xfs_io_error_injection "bmap_alloc_minlen_extent"
> diff --git a/tests/xfs/538 b/tests/xfs/538
> index 90eb1637..53a2c060 100755
> --- a/tests/xfs/538
> +++ b/tests/xfs/538
> @@ -35,6 +35,7 @@ rm -f $seqres.full
>  _supported_fs xfs
>  _require_scratch
>  _require_xfs_debug
> +_require_no_realtime
>  _require_test_program "punch-alternating"
>  _require_xfs_io_error_injection "bmap_alloc_minlen_extent"
>  
> -- 
> 2.29.2
> 

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, back to index

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-04-05  7:44 [PATCH] fstests: Do not execute xfs/{532,533,538} when realtime feature is enabled Chandan Babu R
2021-04-07 16:12 ` Darrick J. Wong

FSTests Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/fstests/0 fstests/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 fstests fstests/ https://lore.kernel.org/fstests \
		fstests@vger.kernel.org
	public-inbox-index fstests

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.fstests


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git