Skip to content

Commit

Permalink
locking-selftests: Handle unexpected failures more strictly
Browse files Browse the repository at this point in the history
When CONFIG_PROVE_LOCKING is not enabled, more tests are
expected to pass unexpectedly, but there no tests that should
start to fail that pass with CONFIG_PROVE_LOCKING enabled.

Signed-off-by: Maarten Lankhorst <[email protected]>
Acked-by: Peter Zijlstra <[email protected]>
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Cc: Linus Torvalds <[email protected]>
Cc: Andrew Morton <[email protected]>
Cc: Thomas Gleixner <[email protected]>
Link: http://lkml.kernel.org/r/20130620113151.4001.77963.stgit@patser
Signed-off-by: Ingo Molnar <[email protected]>
  • Loading branch information
Maarten Lankhorst authored and Ingo Molnar committed Jun 26, 2013
1 parent f3cf139 commit 166989e
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions lib/locking-selftest.c
Original file line number Diff line number Diff line change
Expand Up @@ -976,16 +976,18 @@ static void dotest(void (*testcase_fn)(void), int expected, int lockclass_mask)
/*
* Filter out expected failures:
*/
if (debug_locks != expected) {
#ifndef CONFIG_PROVE_LOCKING
if (expected == FAILURE && debug_locks) {
expected_testcase_failures++;
printk("failed|");
#else
}
else
#endif
if (debug_locks != expected) {
unexpected_testcase_failures++;
printk("FAILED|");

dump_stack();
#endif
} else {
testcase_successes++;
printk(" ok |");
Expand Down

0 comments on commit 166989e

Please sign in to comment.