diff options
author | Peter Zijlstra <peterz@infradead.org> | 2020-12-09 16:42:57 +0100 |
---|---|---|
committer | Peter Zijlstra <peterz@infradead.org> | 2021-01-14 11:20:16 +0100 |
commit | 5831c0f71d6664c6aa7b58ba969bf645c89ecb85 (patch) | |
tree | a25426268897de4408268efcf09a20942a4d17a3 /lib/locking-selftest.c | |
parent | 9271a40d2a1429113160ccc4c16150921600bcc1 (diff) | |
download | linux-stable-5831c0f71d6664c6aa7b58ba969bf645c89ecb85.tar.gz linux-stable-5831c0f71d6664c6aa7b58ba969bf645c89ecb85.tar.bz2 linux-stable-5831c0f71d6664c6aa7b58ba969bf645c89ecb85.zip |
locking/selftests: More granular debug_locks_verbose
Showing all tests all the time is tiresome.
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Diffstat (limited to 'lib/locking-selftest.c')
-rw-r--r-- | lib/locking-selftest.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/locking-selftest.c b/lib/locking-selftest.c index 23376eeccf7c..3306f43b0007 100644 --- a/lib/locking-selftest.c +++ b/lib/locking-selftest.c @@ -1390,6 +1390,8 @@ static void dotest(void (*testcase_fn)(void), int expected, int lockclass_mask) WARN_ON(irqs_disabled()); + debug_locks_silent = !(debug_locks_verbose & lockclass_mask); + testcase_fn(); /* * Filter out expected failures: @@ -1410,7 +1412,7 @@ static void dotest(void (*testcase_fn)(void), int expected, int lockclass_mask) } testcase_total++; - if (debug_locks_verbose) + if (debug_locks_verbose & lockclass_mask) pr_cont(" lockclass mask: %x, debug_locks: %d, expected: %d\n", lockclass_mask, debug_locks, expected); /* @@ -2674,7 +2676,6 @@ void locking_selftest(void) printk(" --------------------------------------------------------------------------\n"); init_shared_classes(); - debug_locks_silent = !debug_locks_verbose; lockdep_set_selftest_task(current); DO_TESTCASE_6R("A-A deadlock", AA); |