Nico Pache
unread,Jul 7, 2026, 2:52:41 PMJul 7Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to kuni...@googlegroups.com, acar...@redhat.com, ke...@kernel.org, aes...@redhat.com, err...@gmail.com, linux-...@vger.kernel.org, sk...@linuxfoundation.org, da...@davidgow.net, li...@roeck-us.net, ak...@linux-foundation.org, Nico Pache
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 <
npa...@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