[PATCH v5 7/7] locking-selftests: handle unexpected failures more strictly
Maarten Lankhorst
maarten.lankhorst at canonical.com
Thu Jun 20 04:31:51 PDT 2013
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 at canonical.com>
---
lib/locking-selftest.c | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
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 |");
More information about the dri-devel
mailing list