From: Zorro Lang <zlang@kernel.org>
To: fstests@vger.kernel.org
Subject: [PATCH 2/2] common/rc: _add_dmesg_filter returns when RESULT_DIR is null
Date: Mon, 23 Jun 2025 04:39:47 +0800 [thread overview]
Message-ID: <20250622203947.797199-2-zlang@kernel.org> (raw)
In-Reply-To: <20250622203947.797199-1-zlang@kernel.org>
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>
---
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-06-22 20:39 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 ` Zorro Lang [this message]
2025-07-10 16:15 ` [PATCH 2/2] common/rc: _add_dmesg_filter returns when RESULT_DIR is null Darrick J. Wong
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=20250622203947.797199-2-zlang@kernel.org \
--to=zlang@kernel.org \
--cc=fstests@vger.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 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.