diff mbox series

[09/13] xfs: skip tests if formatting small filesystem fails

Message ID 173992591276.4080556.2717402179307349211.stgit@frogsfrogsfrogs (mailing list archive)
State New
Headers show
Series [01/13] xfs: fix tests that try to access the realtime rmap inode | expand

Commit Message

Darrick J. Wong Feb. 19, 2025, 1:05 a.m. UTC
From: Darrick J. Wong <djwong@kernel.org>

There are a few tests that try to exercise XFS functionality with an
unusually small (< 500MB) filesystem.  Formatting can fail if the test
configuration also specifies a very large realtime device because mkfs
hits ENOSPC when allocating the realtime metadata.  The test proceeds
anyway (which causes an immediate mount failure) so we might as well
skip these.

Signed-off-by: "Darrick J. Wong" <djwong@kernel.org>
---
 tests/xfs/104 |    1 +
 1 file changed, 1 insertion(+)

Comments

Christoph Hellwig Feb. 19, 2025, 7:30 a.m. UTC | #1
On Tue, Feb 18, 2025 at 05:05:59PM -0800, Darrick J. Wong wrote:
> From: Darrick J. Wong <djwong@kernel.org>
> 
> There are a few tests that try to exercise XFS functionality with an
> unusually small (< 500MB) filesystem.  Formatting can fail if the test
> configuration also specifies a very large realtime device because mkfs
> hits ENOSPC when allocating the realtime metadata.  The test proceeds
> anyway (which causes an immediate mount failure) so we might as well
> skip these.

In this patch only a single test case is touched and not a few.  But
I remember hitting a few more with the zoned testing.
Darrick J. Wong Feb. 19, 2025, 5:13 p.m. UTC | #2
On Tue, Feb 18, 2025 at 11:30:57PM -0800, Christoph Hellwig wrote:
> On Tue, Feb 18, 2025 at 05:05:59PM -0800, Darrick J. Wong wrote:
> > From: Darrick J. Wong <djwong@kernel.org>
> > 
> > There are a few tests that try to exercise XFS functionality with an
> > unusually small (< 500MB) filesystem.  Formatting can fail if the test
> > configuration also specifies a very large realtime device because mkfs
> > hits ENOSPC when allocating the realtime metadata.  The test proceeds
> > anyway (which causes an immediate mount failure) so we might as well
> > skip these.
> 
> In this patch only a single test case is touched and not a few.  But
> I remember hitting a few more with the zoned testing.

Originally there were a few more, but most of the others I fixed by
making _scratch_mkfs_sized constrict the size of both the data and rt
volumes.  The 2022 version of this patch changed both xfs/104 and
xfs/291.

Oh, wait, the xfs/291 change became its own patch.

Right.  _scratch_mkfs_sized takes arguments now.  So this patch should
make create_scratch() use that instead of plain _scratch_mkfs_xfs.

--D
diff mbox series

Patch

diff --git a/tests/xfs/104 b/tests/xfs/104
index cd625d6b74aaaf..e95a3b25c3e514 100755
--- a/tests/xfs/104
+++ b/tests/xfs/104
@@ -16,6 +16,7 @@  _create_scratch()
 {
 	echo "*** mkfs"
 	_scratch_mkfs_xfs $@ | tee -a $seqres.full | _filter_mkfs 2>$tmp.mkfs
+	test "${PIPESTATUS[0]}" -eq 0 || _notrun "formatting small scratch fs failed"
 	. $tmp.mkfs
 
 	echo "*** mount"