Message ID | 20230705153819.GS11441@frogsfrogsfrogs (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | None | expand |
On Wed, Jul 05, 2023 at 08:38:19AM -0700, Darrick J. Wong wrote: > From: Darrick J. Wong <djwong@kernel.org> > > An upcoming patch moves more log validation checks to the superblock > verifier, so update this test as needed. > > Signed-off-by: Darrick J. Wong <djwong@kernel.org> > --- > v2: annotate which commits this tests is testing > --- > tests/xfs/439 | 12 +++++++++--- > 1 file changed, 9 insertions(+), 3 deletions(-) > > diff --git a/tests/xfs/439 b/tests/xfs/439 > index b7929493d1..cb6fb37918 100755 > --- a/tests/xfs/439 > +++ b/tests/xfs/439 > @@ -20,8 +20,14 @@ _begin_fstest auto quick fuzzers log > # real QA test starts here > _supported_fs xfs > _require_scratch_nocheck > -# We corrupt XFS on purpose, and check if assert failures would crash system. > -_require_no_xfs_bug_on_assert > + > +# We corrupt XFS on purpose, and check if assert failures would crash the > +# system when trying to xfs_log_mount. Hence this is a regression test for: > +_fixed_by_git_commit kernel 9c92ee208b1f "xfs: validate sb_logsunit is a multiple of the fs blocksize" > + > +# This used to be _require_no_xfs_bug_on_assert, but now we've fixed the sb > +# verifier to reject this before xfs_log_mount gets to it: > +_fixed_by_git_commit kernel f1e1765aad7d "xfs: journal geometry is not properly bounds checked" Thanks, I'll replace "_fixed_by_git_commit kernel" with "_fixed_by_kernel_commit" when I merge this patch. Others looks good to me. Reviewed-by: Zorro Lang <zlang@redhat.com> > > rm -f "$seqres.full" > > @@ -33,7 +39,7 @@ blksz=$(_scratch_xfs_get_sb_field blocksize) > _scratch_xfs_set_sb_field logsunit $((blksz - 1)) >> $seqres.full 2>&1 > > # Check if logsunit is set correctly > -lsunit=$(_scratch_xfs_get_sb_field logsunit) > +lsunit=$(_scratch_xfs_get_sb_field logsunit 2>/dev/null) > [ $lsunit -ne $((blksz - 1)) ] && _notrun "failed to set sb_logsunit" > > # Mount and writing log may trigger a crash on buggy kernel >
diff --git a/tests/xfs/439 b/tests/xfs/439 index b7929493d1..cb6fb37918 100755 --- a/tests/xfs/439 +++ b/tests/xfs/439 @@ -20,8 +20,14 @@ _begin_fstest auto quick fuzzers log # real QA test starts here _supported_fs xfs _require_scratch_nocheck -# We corrupt XFS on purpose, and check if assert failures would crash system. -_require_no_xfs_bug_on_assert + +# We corrupt XFS on purpose, and check if assert failures would crash the +# system when trying to xfs_log_mount. Hence this is a regression test for: +_fixed_by_git_commit kernel 9c92ee208b1f "xfs: validate sb_logsunit is a multiple of the fs blocksize" + +# This used to be _require_no_xfs_bug_on_assert, but now we've fixed the sb +# verifier to reject this before xfs_log_mount gets to it: +_fixed_by_git_commit kernel f1e1765aad7d "xfs: journal geometry is not properly bounds checked" rm -f "$seqres.full" @@ -33,7 +39,7 @@ blksz=$(_scratch_xfs_get_sb_field blocksize) _scratch_xfs_set_sb_field logsunit $((blksz - 1)) >> $seqres.full 2>&1 # Check if logsunit is set correctly -lsunit=$(_scratch_xfs_get_sb_field logsunit) +lsunit=$(_scratch_xfs_get_sb_field logsunit 2>/dev/null) [ $lsunit -ne $((blksz - 1)) ] && _notrun "failed to set sb_logsunit" # Mount and writing log may trigger a crash on buggy kernel