summaryrefslogtreecommitdiff
path: root/lib/kunit/Makefile
diff options
context:
space:
mode:
authorGuenter Roeck <linux@roeck-us.net>2026-05-14 13:06:38 +0200
committerShuah Khan <skhan@linuxfoundation.org>2026-05-14 10:50:00 -0600
commitbbc960d009a6315f484944506bbb13165069ccc8 (patch)
tree704d9e7ec7e607934d538ed0d940bb2f6870a83b /lib/kunit/Makefile
parent85347718ab0dd7ede9c3e1dcff2d604c7073df05 (diff)
kunit: Add backtrace suppression self-tests
Add unit tests to verify that warning backtrace suppression works. Tests cover both API forms: - Scoped: kunit_warning_suppress() with in-block count verification and post-block inactivity check. - Direct functions: kunit_start/end_suppress_warning() with sequential independent suppression blocks and per-block counts. Furthermore, tests verify incremental warning counting, that kunit_has_active_suppress_warning() transitions correctly around suppression boundaries, and that suppression active in the test kthread does not leak to a separate kthread. If backtrace suppression does _not_ work, the unit tests will likely trigger unsuppressed backtraces, which should actually help to get the affected architectures / platforms fixed. Link: https://lore.kernel.org/r/20260514-kunit_add_support-v11-2-b36a530a6d8f@redhat.com Tested-by: Linux Kernel Functional Testing <lkft@linaro.org> Acked-by: Dan Carpenter <dan.carpenter@linaro.org> Reviewed-by: Kees Cook <keescook@chromium.org> Signed-off-by: Guenter Roeck <linux@roeck-us.net> Signed-off-by: Alessandro Carminati <acarmina@redhat.com> Reviewed-by: David Gow <david@davidgow.net> Signed-off-by: Albert Esteve <aesteve@redhat.com> Signed-off-by: Shuah Khan <skhan@linuxfoundation.org>
Diffstat (limited to 'lib/kunit/Makefile')
-rw-r--r--lib/kunit/Makefile1
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/kunit/Makefile b/lib/kunit/Makefile
index 4592f9d0aa8d..2e8a6b71a2ab 100644
--- a/lib/kunit/Makefile
+++ b/lib/kunit/Makefile
@@ -22,6 +22,7 @@ obj-$(if $(CONFIG_KUNIT),y) += hooks.o
obj-$(CONFIG_KUNIT_TEST) += kunit-test.o
obj-$(CONFIG_KUNIT_TEST) += platform-test.o
+obj-$(CONFIG_KUNIT_TEST) += backtrace-suppression-test.o
# string-stream-test compiles built-in only.
ifeq ($(CONFIG_KUNIT_TEST),y)