lockdep/selftest: Add more recursive read related test cases
authorBoqun Feng <boqun.feng@gmail.com>
Fri, 7 Aug 2020 07:42:35 +0000 (15:42 +0800)
committerPeter Zijlstra <peterz@infradead.org>
Wed, 26 Aug 2020 10:42:07 +0000 (12:42 +0200)
commit8ef7ca75120a39167def40f41daefee013c4b5af
tree0c049e83c7dc22eeaa3d3a8f5fd285d4fbc7c55e
parent31e0d747708272356bee9b6a1b90c1e6525b0f6d
lockdep/selftest: Add more recursive read related test cases

Add those four test cases:

1. X --(ER)--> Y --(ER)--> Z --(ER)--> X is deadlock.

2. X --(EN)--> Y --(SR)--> Z --(ER)--> X is deadlock.

3. X --(EN)--> Y --(SR)--> Z --(SN)--> X is not deadlock.

4. X --(ER)--> Y --(SR)--> Z --(EN)--> X is not deadlock.

Those self testcases are valuable for the development of supporting
recursive read related deadlock detection.

Signed-off-by: Boqun Feng <boqun.feng@gmail.com>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Link: https://lkml.kernel.org/r/20200807074238.1632519-17-boqun.feng@gmail.com
lib/locking-selftest.c