From: Nico Pache <npache@redhat.com>
To: kunit-dev@googlegroups.com, acarmina@redhat.com, kees@kernel.org,
aesteve@redhat.com, error27@gmail.com,
linux-kernel@vger.kernel.org
Cc: skhan@linuxfoundation.org, david@davidgow.net,
linux@roeck-us.net, akpm@linux-foundation.org,
Nico Pache <npache@redhat.com>
Subject: [PATCH] kunit/bug.c: fix backtrace-supression-test failure as a module
Date: Tue, 7 Jul 2026 12:54:05 -0600 [thread overview]
Message-ID: <20260707185405.571277-1-npache@redhat.com> (raw)
When running the backtrace-supression-test as a module most cases produce
failures.
Upon further investigating the issue presents itself due to the ifdef that
wraps the kunit_is_supressed_warning, which is not compiled in if using
CONFIG_KUNIT_MODULE.
Fix this by switching to IS_ENABLED(CONFIG_KUNIT) which properly checks
for either CONFIG_KUNIT_MODULE or CONFIG_KUNIT.
Fixes: bbc960d009a6 ("kunit: Add backtrace suppression self-tests")
Signed-off-by: Nico Pache <npache@redhat.com>
---
lib/bug.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lib/bug.c b/lib/bug.c
index 292420f45811..b9820a0226f5 100644
--- a/lib/bug.c
+++ b/lib/bug.c
@@ -219,7 +219,7 @@ static enum bug_trap_type __report_bug(struct bug_entry *bug, unsigned long buga
no_cut = bug->flags & BUGFLAG_NO_CUT_HERE;
has_args = bug->flags & BUGFLAG_ARGS;
-#ifdef CONFIG_KUNIT
+#if IS_ENABLED(CONFIG_KUNIT)
/*
* Before the once logic so suppressed warnings do not consume
* the single-fire budget of WARN_ON_ONCE().
--
2.54.0
next reply other threads:[~2026-07-07 18:52 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-07 18:54 Nico Pache [this message]
2026-07-08 7:26 ` Albert Esteve
2026-07-08 13:34 ` Nico Pache
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=20260707185405.571277-1-npache@redhat.com \
--to=npache@redhat.com \
--cc=acarmina@redhat.com \
--cc=aesteve@redhat.com \
--cc=akpm@linux-foundation.org \
--cc=david@davidgow.net \
--cc=error27@gmail.com \
--cc=kees@kernel.org \
--cc=kunit-dev@googlegroups.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@roeck-us.net \
--cc=skhan@linuxfoundation.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