diff options
author | David Gow <davidgow@google.com> | 2024-04-23 17:08:06 +0800 |
---|---|---|
committer | Shuah Khan <skhan@linuxfoundation.org> | 2024-05-06 14:22:02 -0600 |
commit | 4b513a02fd052ad65566db31ba64ea5ee2ba1ce9 (patch) | |
tree | c8b79fcc6a344a324593380bf4d4e748aa3ad7d6 /lib/zlib_dfltcc | |
parent | fabd480b721eb30aa4e2c89507b53933069f9f6e (diff) |
kunit: test: Move fault tests behind KUNIT_FAULT_TEST Kconfig option
The NULL dereference tests in kunit_fault deliberately trigger a kernel
BUG(), and therefore print the associated stack trace, even when the
test passes. This is both annoying (as it bloats the test output), and
can confuse some test harnesses, which assume any BUG() is a failure.
Allow these tests to be specifically disabled (without disabling all
of KUnit's other tests), by placing them behind the
CONFIG_KUNIT_FAULT_TEST Kconfig option. This is enabled by default, but
can be set to 'n' to disable the test. An empty 'kunit_fault' suite is
left behind, which will automatically be marked 'skipped'.
As the fault tests already were disabled under UML (as they weren't
compatible with its fault handling), we can simply adapt those
conditions, and add a dependency on !UML for our new option.
Suggested-by: Guenter Roeck <linux@roeck-us.net>
Link: https://lore.kernel.org/all/928249cc-e027-4f7f-b43f-502f99a1ea63@roeck-us.net/
Fixes: 82b0beff3497 ("kunit: Add tests for fault")
Signed-off-by: David Gow <davidgow@google.com>
Reviewed-by: Mickaël Salaün <mic@digikod.net>
Reviewed-by: Rae Moar <rmoar@google.com>
Signed-off-by: Shuah Khan <skhan@linuxfoundation.org>
Diffstat (limited to 'lib/zlib_dfltcc')
0 files changed, 0 insertions, 0 deletions