On Wed, May 21, 2025 at 03:42:54PM -0700, Darrick J. Wong wrote: > From: Darrick J. Wong <djwong@xxxxxxxxxx> > > Currently, ./check calls _check_filesystems after a test passes to make > sure that the test and scratch filesystems are ok, and repairs the test > filesystem if it's not ok. > > However, we don't do this for failed tests. If a test fails /and/ > corrupts the test filesystem, every subsequent passing test will be > marked as a failure because of latent corruptions on the test > filesystem. > > This is a little silly, so let's call _check_filesystems on the test > filesystem after a test fail so that the badness doesn't spread. > > Cc: <fstests@xxxxxxxxxxxxxxx> # v2023.05.01 > Fixes: 4a444bc19a836f ("check: _check_filesystems for errors even if test failed") > Signed-off-by: "Darrick J. Wong" <djwong@xxxxxxxxxx> > --- > check | 7 ++++++- > 1 file changed, 6 insertions(+), 1 deletion(-) > > > diff --git a/check b/check > index 826641268f8b52..818ce44da28f65 100755 > --- a/check > +++ b/check > @@ -986,8 +986,13 @@ function run_section() > _dump_err_cont "[failed, exit status $sts]" > _test_unmount 2> /dev/null > _scratch_unmount 2> /dev/null > - rm -f ${RESULT_DIR}/require_test* > rm -f ${RESULT_DIR}/require_scratch* > + > + # Make sure the test filesystem is ready to go since > + # we don't call _check_filesystems for failed tests > + (_adjust_oom_score 250; _check_filesystems) || tc_status="fail" Maybe break the line after the || to improve readability? Otherwise looks good: Reviewed-by: Christoph Hellwig <hch@xxxxxx>