All of lore.kernel.org
 help / color / mirror / Atom feed
* + kunit-bugc-fix-backtrace-supression-test-failure-as-a-module.patch added to mm-nonmm-unstable branch
@ 2026-07-07 19:55 Andrew Morton
  0 siblings, 0 replies; only message in thread
From: Andrew Morton @ 2026-07-07 19:55 UTC (permalink / raw)
  To: mm-commits, linux, kees, error27, david, acarmina, npache, akpm


The patch titled
     Subject: kunit/bug.c: fix backtrace-supression-test failure as a module
has been added to the -mm mm-nonmm-unstable branch.  Its filename is
     kunit-bugc-fix-backtrace-supression-test-failure-as-a-module.patch

This patch will shortly appear at
     https://git.kernel.org/pub/scm/linux/kernel/git/akpm/25-new.git/tree/patches/kunit-bugc-fix-backtrace-supression-test-failure-as-a-module.patch

This patch will later appear in the mm-nonmm-unstable branch at
    git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm

Before you just go and hit "reply", please:
   a) Consider who else should be cc'ed
   b) Prefer to cc a suitable mailing list as well
   c) Ideally: find the original patch on the mailing list and do a
      reply-to-all to that, adding suitable additional cc's

*** Remember to use Documentation/process/submit-checklist.rst when testing your code ***

The -mm tree is included into linux-next via various
branches at git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm
and is updated there most days

------------------------------------------------------
From: Nico Pache <npache@redhat.com>
Subject: kunit/bug.c: fix backtrace-supression-test failure as a module
Date: Tue, 7 Jul 2026 12:54:05 -0600

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_suppressed_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.

Link: https://lore.kernel.org/20260707185405.571277-1-npache@redhat.com
Fixes: bbc960d009a6 ("kunit: Add backtrace suppression self-tests")
Signed-off-by: Nico Pache <npache@redhat.com>
Cc: Alessandro Carminati <acarmina@redhat.com>
Cc: Dan Carpenter <error27@gmail.com>
Cc: David Gow <david@davidgow.net>
Cc: Guenetr Roeck <linux@roeck-us.net>
Cc: Kees Cook <kees@kernel.org>
Cc: Nico Pache <npache@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---

 lib/bug.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- a/lib/bug.c~kunit-bugc-fix-backtrace-supression-test-failure-as-a-module
+++ a/lib/bug.c
@@ -219,7 +219,7 @@ static enum bug_trap_type __report_bug(s
 	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().
_

Patches currently in -mm which might be from npache@redhat.com are

mm-decrement-mthp_stat_nr_anon-in-free_zone_device_folio.patch
mm-migrate-exclude-hugetlb-folios-from-mthp_stat_nr_anon-accounting.patch
kunit-bugc-fix-backtrace-supression-test-failure-as-a-module.patch


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2026-07-07 19:55 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-07-07 19:55 + kunit-bugc-fix-backtrace-supression-test-failure-as-a-module.patch added to mm-nonmm-unstable branch Andrew Morton

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.