]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
locking-selftests: Handle unexpected failures more strictly
authorMaarten Lankhorst <maarten.lankhorst@canonical.com>
Thu, 20 Jun 2013 11:31:51 +0000 (13:31 +0200)
committerIngo Molnar <mingo@kernel.org>
Wed, 26 Jun 2013 10:10:59 +0000 (12:10 +0200)
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>
lib/locking-selftest.c

index d554f3fed846974ec572f0192a6009fdbb8dfd2b..aad024dde3c476c9865c1153fd8d57de266d4dd9 100644 (file)
@@ -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  |");