Skip to content

Commit

Permalink
locking/selftest: Remove the bad unlock ordering test
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Peter Zijlstra authored and Ingo Molnar committed Jun 8, 2017
1 parent f569478 commit cfb6133
Showing 1 changed file with 0 additions and 29 deletions.
29 changes: 0 additions & 29 deletions lib/locking-selftest.c
Original file line number Diff line number Diff line change
Expand Up @@ -515,34 +515,6 @@ GENERATE_TESTCASE(double_unlock_rsem)

#undef E

/*
* Bad unlock ordering:
*/
#define E() \
\
LOCK(A); \
LOCK(B); \
UNLOCK(A); /* fail */ \
UNLOCK(B);

/*
* 6 testcases:
*/
#include "locking-selftest-spin.h"
GENERATE_TESTCASE(bad_unlock_order_spin)
#include "locking-selftest-wlock.h"
GENERATE_TESTCASE(bad_unlock_order_wlock)
#include "locking-selftest-rlock.h"
GENERATE_TESTCASE(bad_unlock_order_rlock)
#include "locking-selftest-mutex.h"
GENERATE_TESTCASE(bad_unlock_order_mutex)
#include "locking-selftest-wsem.h"
GENERATE_TESTCASE(bad_unlock_order_wsem)
#include "locking-selftest-rsem.h"
GENERATE_TESTCASE(bad_unlock_order_rsem)

#undef E

/*
* initializing a held lock:
*/
Expand Down Expand Up @@ -1825,7 +1797,6 @@ void locking_selftest(void)
DO_TESTCASE_6R("A-B-C-D-B-C-D-A deadlock", ABCDBCDA);
DO_TESTCASE_6("double unlock", double_unlock);
DO_TESTCASE_6("initialize held", init_held);
DO_TESTCASE_6_SUCCESS("bad unlock order", bad_unlock_order);

printk(" --------------------------------------------------------------------------\n");
print_testname("recursive read-lock");
Expand Down

0 comments on commit cfb6133

Please sign in to comment.