diff options
author | Maarten Lankhorst <maarten.lankhorst@canonical.com> | 2013-06-20 07:31:51 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@kernel.org> | 2013-06-26 06:10:59 -0400 |
commit | 166989e366ffa66108b2f37b870e66b85b2185ad (patch) | |
tree | 1973b0dc9dd2eb10b35d541fffca643d210ae3d2 /lib/locking-selftest.c | |
parent | f3cf139efa4bc0fe4f032af6ca3e49e38a5d9ae5 (diff) |
locking-selftests: Handle unexpected failures more strictly
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 <maarten.lankhorst@canonical.com>
Acked-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: dri-devel@lists.freedesktop.org
Cc: linaro-mm-sig@lists.linaro.org
Cc: rostedt@goodmis.org
Cc: daniel@ffwll.ch
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Link: http://lkml.kernel.org/r/20130620113151.4001.77963.stgit@patser
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'lib/locking-selftest.c')
-rw-r--r-- | lib/locking-selftest.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/lib/locking-selftest.c b/lib/locking-selftest.c index d554f3fed846..aad024dde3c4 100644 --- a/lib/locking-selftest.c +++ b/lib/locking-selftest.c | |||
@@ -976,16 +976,18 @@ static void dotest(void (*testcase_fn)(void), int expected, int lockclass_mask) | |||
976 | /* | 976 | /* |
977 | * Filter out expected failures: | 977 | * Filter out expected failures: |
978 | */ | 978 | */ |
979 | if (debug_locks != expected) { | ||
980 | #ifndef CONFIG_PROVE_LOCKING | 979 | #ifndef CONFIG_PROVE_LOCKING |
980 | if (expected == FAILURE && debug_locks) { | ||
981 | expected_testcase_failures++; | 981 | expected_testcase_failures++; |
982 | printk("failed|"); | 982 | printk("failed|"); |
983 | #else | 983 | } |
984 | else | ||
985 | #endif | ||
986 | if (debug_locks != expected) { | ||
984 | unexpected_testcase_failures++; | 987 | unexpected_testcase_failures++; |
985 | printk("FAILED|"); | 988 | printk("FAILED|"); |
986 | 989 | ||
987 | dump_stack(); | 990 | dump_stack(); |
988 | #endif | ||
989 | } else { | 991 | } else { |
990 | testcase_successes++; | 992 | testcase_successes++; |
991 | printk(" ok |"); | 993 | printk(" ok |"); |