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

Darrick J. Wong
2025-02-19T01:06:00Z

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(+)

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"