]> www.infradead.org Git - users/hch/xfstests-dev.git/commitdiff
xfs: skip tests if formatting small filesystem fails
authorDarrick J. Wong <djwong@kernel.org>
Tue, 6 Feb 2024 00:06:46 +0000 (16:06 -0800)
committerDarrick J. Wong <djwong@kernel.org>
Fri, 1 Nov 2024 20:41:59 +0000 (13:41 -0700)
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
tests/xfs/291

index 7f11f89a550aa89363f729d401073f62db4e89c9..012e0e32add2e12621b757b57ae0d533f1dfe914 100755 (executable)
@@ -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"
index 0141c075be215af2e44982bf59d73fbda5575b6b..9ded4fb4b0e2b210161c1ee1c52acb37ec8c7b57 100755 (executable)
@@ -26,7 +26,8 @@ _xfs_setup_verify_metadump
 
 _require_scratch
 logblks=$(_scratch_find_xfs_min_logblocks -n size=16k -d size=133m)
-_scratch_mkfs_xfs -n size=16k -l size=${logblks}b -d size=133m >> $seqres.full 2>&1
+_scratch_mkfs_xfs -n size=16k -l size=${logblks}b -d size=133m >> $seqres.full 2>&1 || \
+       _notrun "formatting small scratch fs failed"
 _scratch_mount
 
 # First we cause very badly fragmented freespace, then