On Thu, Aug 6, 2020 at 1:37 PM Uriel Guajardo urielguajardojr@gmail.com wrote:
From: Uriel Guajardo urielguajardo@google.com
KUnit tests will now fail if lockdep detects an error during a test case.
The idea comes from how lib/locking-selftest [1] checks for lock errors: we first if lock debugging is turned on. If not, an error must have occurred, so we fail the test and restart lockdep for the next test case.
Like the locking selftests, we also fix possible preemption count corruption from lock bugs.
Depends on kunit: support failure from dynamic analysis tools [2]
[1] https://elixir.bootlin.com/linux/v5.7.12/source/lib/locking-selftest.c#L1137
[2] https://lore.kernel.org/linux-kselftest/20200806174326.3577537-1-urielguajar...
Signed-off-by: Uriel Guajardo urielguajardo@google.com
Reviewed-by: Brendan Higgins brendanhiggins@google.com