summaryrefslogtreecommitdiff
path: root/tools/lib/lockdep/tests
diff options
context:
space:
mode:
authorBart Van Assche <bvanassche@acm.org>2019-02-14 15:00:58 -0800
committerIngo Molnar <mingo@kernel.org>2019-02-28 07:55:48 +0100
commitf214737b75b0ee79763b5c058b9d5e83d711348d (patch)
tree984c71e50a6ae9a95cb5d825438993b45266a4a6 /tools/lib/lockdep/tests
parentd93ac78bf7b37db36fa00225f8e9a14c7ed1b2ba (diff)
lockdep/lib/tests: Test dynamic key registration
Make sure that the lockdep_register_key() and lockdep_unregister_key() code is tested when running the lockdep tests. Signed-off-by: Bart Van Assche <bvanassche@acm.org> Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org> Cc: Andrew Morton <akpm@linux-foundation.org> Cc: Johannes Berg <johannes@sipsolutions.net> Cc: Linus Torvalds <torvalds@linux-foundation.org> Cc: Paul E. McKenney <paulmck@linux.vnet.ibm.com> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Thomas Gleixner <tglx@linutronix.de> Cc: Waiman Long <longman@redhat.com> Cc: Will Deacon <will.deacon@arm.com> Cc: johannes.berg@intel.com Cc: tj@kernel.org Link: https://lkml.kernel.org/r/20190214230058.196511-24-bvanassche@acm.org Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'tools/lib/lockdep/tests')
-rw-r--r--tools/lib/lockdep/tests/ABBA.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/tools/lib/lockdep/tests/ABBA.c b/tools/lib/lockdep/tests/ABBA.c
index 623313f54720..543789bc3e37 100644
--- a/tools/lib/lockdep/tests/ABBA.c
+++ b/tools/lib/lockdep/tests/ABBA.c
@@ -14,4 +14,13 @@ void main(void)
pthread_mutex_destroy(&b);
pthread_mutex_destroy(&a);
+
+ pthread_mutex_init(&a, NULL);
+ pthread_mutex_init(&b, NULL);
+
+ LOCK_UNLOCK_2(a, b);
+ LOCK_UNLOCK_2(b, a);
+
+ pthread_mutex_destroy(&b);
+ pthread_mutex_destroy(&a);
}