Skip to content
Commit 1195505f authored by Uriel Guajardo's avatar Uriel Guajardo Committed by Shuah Khan
Browse files

kunit: ubsan integration



Integrates UBSAN into the KUnit testing framework. It fails KUnit tests
whenever it reports undefined behavior.

When CONFIG_KUNIT=n, nothing is printed or even formatted, so this has
no behavioral impact outside of tests.

kunit_fail_current_test() effectively does a pr_err() as well, so
there's some slight duplication, but it also ensures an error is
recorded in the debugfs entry for the running KUnit test.

Print a shorter version of the message to make it less spammy.

Co-developed-by: default avatarDaniel Latypov <dlatypov@google.com>
Signed-off-by: default avatarDaniel Latypov <dlatypov@google.com>
Signed-off-by: default avatarUriel Guajardo <urielguajardo@google.com>
Reviewed-by: default avatarAlan Maguire <alan.maguire@oracle.com>
Signed-off-by: default avatarShuah Khan <skhan@linuxfoundation.org>
parent b0d4adaf
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment