From: Maarten Lankhorst Date: Thu, 20 Jun 2013 11:31:51 +0000 (+0200) Subject: locking-selftests: Handle unexpected failures more strictly X-Git-Tag: upstream/snapshot3+hdmi~4836^2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=166989e366ffa66108b2f37b870e66b85b2185ad;p=platform%2Fadaptation%2Frenesas_rcar%2Frenesas_kernel.git 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 Acked-by: Peter Zijlstra Cc: dri-devel@lists.freedesktop.org Cc: linaro-mm-sig@lists.linaro.org Cc: rostedt@goodmis.org Cc: daniel@ffwll.ch Cc: Linus Torvalds Cc: Andrew Morton Cc: Thomas Gleixner Link: http://lkml.kernel.org/r/20130620113151.4001.77963.stgit@patser Signed-off-by: Ingo Molnar --- diff --git a/lib/locking-selftest.c b/lib/locking-selftest.c index d554f3f..aad024d 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) /* * 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 |");