Commit 166989e366ffa66108b2f37b870e66b85b2185ad

Authored by Maarten Lankhorst
Committed by Ingo Molnar
1 parent f3cf139efa

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>

Showing 1 changed file with 5 additions and 3 deletions Side-by-side Diff

lib/locking-selftest.c
... ... @@ -976,16 +976,18 @@
976 976 /*
977 977 * Filter out expected failures:
978 978 */
979   - if (debug_locks != expected) {
980 979 #ifndef CONFIG_PROVE_LOCKING
  980 + if (expected == FAILURE && debug_locks) {
981 981 expected_testcase_failures++;
982 982 printk("failed|");
983   -#else
  983 + }
  984 + else
  985 +#endif
  986 + if (debug_locks != expected) {
984 987 unexpected_testcase_failures++;
985 988 printk("FAILED|");
986 989  
987 990 dump_stack();
988   -#endif
989 991 } else {
990 992 testcase_successes++;
991 993 printk(" ok |");