]> git.baikalelectronics.ru Git - kernel.git/commit
locking/selftest: Avoid false BUG report
authorPeter Zijlstra <peterz@infradead.org>
Wed, 4 Oct 2017 08:50:25 +0000 (10:50 +0200)
committerIngo Molnar <mingo@kernel.org>
Tue, 10 Oct 2017 08:04:29 +0000 (10:04 +0200)
commite64d4fb7684c615e137192a19754974f4873b22c
tree4c03ba202875cdcbe6c72fbc7a1f483af46f9c5c
parent60269f707e979d383faedfa7ee38f70173800ce6
locking/selftest: Avoid false BUG report

The work-around for the expected failure is providing another failure :/

Only when CONFIG_PROVE_LOCKING=y do we increment unexpected_testcase_failures,
so only then do we need to decrement, otherwise we'll end up with a negative
number and that will again trigger a BUG (printout, not crash).

Reported-by: Fengguang Wu <fengguang.wu@intel.com>
Tested-by: Fengguang Wu <fengguang.wu@intel.com>
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>
Fixes: 2fc3b16cae8f ("locking/lockdep/selftests: Fix mixed read-write ABBA tests")
Signed-off-by: Ingo Molnar <mingo@kernel.org>
lib/locking-selftest.c