From: "Darrick J. Wong" <djwong@kernel.org>
To: Zorro Lang <zlang@kernel.org>
Cc: fstests@vger.kernel.org
Subject: Re: [PATCH 2/2] common/rc: _add_dmesg_filter returns when RESULT_DIR is null
Date: Thu, 10 Jul 2025 09:15:15 -0700 [thread overview]
Message-ID: <20250710161515.GB2672039@frogsfrogsfrogs> (raw)
In-Reply-To: <20250622203947.797199-2-zlang@kernel.org>
On Mon, Jun 23, 2025 at 04:39:47AM +0800, Zorro Lang wrote:
> I always hit below error on a system with readonly rootfs:
>
> ++ _xfs_prepare_for_eio_shutdown /dev/loop0
> ...
> ++ _add_dmesg_filter 'Internal error'
> ++ local 'regexp=Internal error'
> ++ local filter_file=/dmesg_filter
> ++ '[' '!' -e /dmesg_filter ']'
> ++ echo 'Internal error'
> ./common/rc: line 4716: /dmesg_filter: Read-only file system
>
> The RESULT_DIR is null, due to xfstests/check calls _test_mount and
> _scratch_mount before RESULT_DIR creation. And _test_mount does
> _prepare_for_eio_shutdown -> _xfs_prepare_for_eio_shutdown ->
> _add_dmesg_filter "Internal error" when RESULT_DIR is null.
>
> Signed-off-by: Zorro Lang <zlang@kernel.org>
Looks good,
Reviewed-by: "Darrick J. Wong" <djwong@kernel.org>
--D
> ---
> common/rc | 6 ++++++
> 1 file changed, 6 insertions(+)
>
> diff --git a/common/rc b/common/rc
> index a27f87a0b..549f42135 100644
> --- a/common/rc
> +++ b/common/rc
> @@ -4800,6 +4800,12 @@ _check_dmesg_filter()
> # Add a simple expression to the default dmesg filter
> _add_dmesg_filter()
> {
> + # This function might be called before having RESULT_DIR, do nothing
> + # if RESULT_DIR isn't created
> + if [ ! -d "${RESULT_DIR}" ];then
> + return 1
> + fi
> +
> local regexp="$1"
> local filter_file="${RESULT_DIR}/dmesg_filter"
>
> --
> 2.47.1
>
>
next prev parent reply other threads:[~2025-07-10 16:15 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-06-22 20:39 [PATCH 1/2] common/rc: remove useless _pgrep funcion Zorro Lang
2025-06-22 20:39 ` [PATCH 2/2] common/rc: _add_dmesg_filter returns when RESULT_DIR is null Zorro Lang
2025-07-10 16:15 ` Darrick J. Wong [this message]
2025-07-10 16:09 ` [PATCH 1/2] common/rc: remove useless _pgrep funcion Zorro Lang
2025-07-10 16:14 ` Darrick J. Wong
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=20250710161515.GB2672039@frogsfrogsfrogs \
--to=djwong@kernel.org \
--cc=fstests@vger.kernel.org \
--cc=zlang@kernel.org \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox