From: Christoph Hellwig <hch@infradead.org>
To: "Darrick J. Wong" <djwong@kernel.org>
Cc: zlang@redhat.com, fstests@vger.kernel.org, linux-xfs@vger.kernel.org
Subject: Re: [PATCH 4/4] check: check and fix the test filesystem after failed tests
Date: Thu, 22 May 2025 22:14:08 -0700 [thread overview]
Message-ID: <aDAEIE-UPT6P4xsE@infradead.org> (raw)
In-Reply-To: <174786719769.1398933.12370766699740321314.stgit@frogsfrogsfrogs>
On Wed, May 21, 2025 at 03:42:54PM -0700, Darrick J. Wong wrote:
> From: Darrick J. Wong <djwong@kernel.org>
>
> 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@vger.kernel.org> # v2023.05.01
> Fixes: 4a444bc19a836f ("check: _check_filesystems for errors even if test failed")
> Signed-off-by: "Darrick J. Wong" <djwong@kernel.org>
> ---
> 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@lst.de>
next prev parent reply other threads:[~2025-05-23 5:14 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-05-21 22:40 [PATCHSET 2/2] fstests: more random fixes for v2025.05.11 Darrick J. Wong
2025-05-21 22:42 ` [PATCH 1/4] generic/251: fix infinite looping if fstrim_loop configuration fails Darrick J. Wong
2025-05-23 5:13 ` Christoph Hellwig
2025-05-21 22:42 ` [PATCH 2/4] generic/251: skip this test if fstrim geometry detection fails Darrick J. Wong
2025-05-23 5:13 ` Christoph Hellwig
2025-05-21 22:42 ` [PATCH 3/4] check: unbreak iam Darrick J. Wong
2025-05-23 5:13 ` Christoph Hellwig
2025-05-23 13:36 ` Zorro Lang
2025-05-21 22:42 ` [PATCH 4/4] check: check and fix the test filesystem after failed tests Darrick J. Wong
2025-05-23 5:14 ` Christoph Hellwig [this message]
2025-05-23 13:39 ` Zorro Lang
2025-05-23 13:48 ` Zorro Lang
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=aDAEIE-UPT6P4xsE@infradead.org \
--to=hch@infradead.org \
--cc=djwong@kernel.org \
--cc=fstests@vger.kernel.org \
--cc=linux-xfs@vger.kernel.org \
--cc=zlang@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.