Skip to content

Commit c33b688

Browse files
bjackmanshuahkh
authored andcommitted
kunit: make FAULT_TEST default to n when PANIC_ON_OOPS
As describe in the help string, the user might want to disable these tests if they don't like to see stacktraces/BUG etc in their kernel log. However, if they enable PANIC_ON_OOPS, these tests also crash the machine, which it's safe to assume _almost_ nobody wants. One might argue that _absolutely_ nobody ever wants their kernel to crash so this should just be a hard dependency instead of a default. However, since this is rather special code that's anyway concerned with deliberately doing "bad" things, the normal rules don't seem to apply, hence prefer flexibility and allow users to set up a crashing Kconfig if they so choose. Link: https://lore.kernel.org/r/20251207-kunit-fault-no-panic-v1-1-2ac932f26864@google.com Signed-off-by: Brendan Jackman <jackmanb@google.com> Reviewed-by: David Gow <davidgow@google.com> Signed-off-by: Shuah Khan <skhan@linuxfoundation.org>
1 parent 726c93b commit c33b688

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

lib/kunit/Kconfig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ config KUNIT_FAULT_TEST
2828
bool "Enable KUnit tests which print BUG stacktraces"
2929
depends on KUNIT_TEST
3030
depends on !UML
31-
default y
31+
default !PANIC_ON_OOPS
3232
help
3333
Enables fault handling tests for the KUnit framework. These tests may
3434
trigger a kernel BUG(), and the associated stack trace, even when they

0 commit comments

Comments
 (0)