summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorPeter Zijlstra <peterz@infradead.org>2017-08-28 08:42:45 -0400
committerIngo Molnar <mingo@kernel.org>2017-08-29 09:15:17 -0400
commitd82fed75294229abc9d757f08a4817febae6c4f4 (patch)
treec3efefae71e4e11df469ca68f5dab855ace0e7c4 /lib
parentec81048cc340bb03334e6ca62661ecc0a684897a (diff)
locking/lockdep/selftests: Fix mixed read-write ABBA tests
Commit: e91498589746 ("locking/lockdep/selftests: Add mixed read-write ABBA tests") adds an explicit FAILURE to the locking selftest but overlooked the fact that this kills lockdep. Fudge the test to avoid this. Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org> Cc: Linus Torvalds <torvalds@linux-foundation.org> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Thomas Gleixner <tglx@linutronix.de> Cc: hpa@zytor.com Link: http://lkml.kernel.org/r/20170828124245.xlo2yshxq2btgmuf@hirez.programming.kicks-ass.net Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'lib')
-rw-r--r--lib/locking-selftest.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/locking-selftest.c b/lib/locking-selftest.c
index 3c7151a6cd98..cd0b5c964bd0 100644
--- a/lib/locking-selftest.c
+++ b/lib/locking-selftest.c
@@ -2031,6 +2031,12 @@ void locking_selftest(void)
2031 print_testname("mixed read-lock/lock-write ABBA"); 2031 print_testname("mixed read-lock/lock-write ABBA");
2032 pr_cont(" |"); 2032 pr_cont(" |");
2033 dotest(rlock_ABBA1, FAILURE, LOCKTYPE_RWLOCK); 2033 dotest(rlock_ABBA1, FAILURE, LOCKTYPE_RWLOCK);
2034 /*
2035 * Lockdep does indeed fail here, but there's nothing we can do about
2036 * that now. Don't kill lockdep for it.
2037 */
2038 unexpected_testcase_failures--;
2039
2034 pr_cont(" |"); 2040 pr_cont(" |");
2035 dotest(rwsem_ABBA1, FAILURE, LOCKTYPE_RWSEM); 2041 dotest(rwsem_ABBA1, FAILURE, LOCKTYPE_RWSEM);
2036 2042