summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPeter Zijlstra <peterz@infradead.org>2017-05-31 11:05:46 -0400
committerIngo Molnar <mingo@kernel.org>2017-06-08 04:35:49 -0400
commitcfb6133399a490419cda55fcdcf9dbbca65eacba (patch)
tree45cb60dce586cb2faac73d9dceb0abb971478e09
parentf5694788ad8da5da41b501f3d6d2ae22379c4ef9 (diff)
locking/selftest: Remove the bad unlock ordering test
There is no such thing as a bad unlock order. Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org> Cc: Linus Torvalds <torvalds@linux-foundation.org> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Thomas Gleixner <tglx@linutronix.de> Cc: linux-kernel@vger.kernel.org Signed-off-by: Ingo Molnar <mingo@kernel.org>
-rw-r--r--lib/locking-selftest.c29
1 files changed, 0 insertions, 29 deletions
diff --git a/lib/locking-selftest.c b/lib/locking-selftest.c
index f3a217ea0388..dd09e517c492 100644
--- a/lib/locking-selftest.c
+++ b/lib/locking-selftest.c
@@ -516,34 +516,6 @@ GENERATE_TESTCASE(double_unlock_rsem)
516#undef E 516#undef E
517 517
518/* 518/*
519 * Bad unlock ordering:
520 */
521#define E() \
522 \
523 LOCK(A); \
524 LOCK(B); \
525 UNLOCK(A); /* fail */ \
526 UNLOCK(B);
527
528/*
529 * 6 testcases:
530 */
531#include "locking-selftest-spin.h"
532GENERATE_TESTCASE(bad_unlock_order_spin)
533#include "locking-selftest-wlock.h"
534GENERATE_TESTCASE(bad_unlock_order_wlock)
535#include "locking-selftest-rlock.h"
536GENERATE_TESTCASE(bad_unlock_order_rlock)
537#include "locking-selftest-mutex.h"
538GENERATE_TESTCASE(bad_unlock_order_mutex)
539#include "locking-selftest-wsem.h"
540GENERATE_TESTCASE(bad_unlock_order_wsem)
541#include "locking-selftest-rsem.h"
542GENERATE_TESTCASE(bad_unlock_order_rsem)
543
544#undef E
545
546/*
547 * initializing a held lock: 519 * initializing a held lock:
548 */ 520 */
549#define E() \ 521#define E() \
@@ -1825,7 +1797,6 @@ void locking_selftest(void)
1825 DO_TESTCASE_6R("A-B-C-D-B-C-D-A deadlock", ABCDBCDA); 1797 DO_TESTCASE_6R("A-B-C-D-B-C-D-A deadlock", ABCDBCDA);
1826 DO_TESTCASE_6("double unlock", double_unlock); 1798 DO_TESTCASE_6("double unlock", double_unlock);
1827 DO_TESTCASE_6("initialize held", init_held); 1799 DO_TESTCASE_6("initialize held", init_held);
1828 DO_TESTCASE_6_SUCCESS("bad unlock order", bad_unlock_order);
1829 1800
1830 printk(" --------------------------------------------------------------------------\n"); 1801 printk(" --------------------------------------------------------------------------\n");
1831 print_testname("recursive read-lock"); 1802 print_testname("recursive read-lock");