Re: [PATCH] kunit: added lockdep support
From: Brendan Higgins
Date: Mon Aug 10 2020 - 16:34:19 EST
On Thu, Aug 6, 2020 at 1:37 PM Uriel Guajardo <urielguajardojr@xxxxxxxxx> wrote:
>
> From: Uriel Guajardo <urielguajardo@xxxxxxxxxx>
>
> 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-urielguajardojr@xxxxxxxxx/
>
> Signed-off-by: Uriel Guajardo <urielguajardo@xxxxxxxxxx>
Reviewed-by: Brendan Higgins <brendanhiggins@xxxxxxxxxx>