From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754176AbdH2O2o (ORCPT ); Tue, 29 Aug 2017 10:28:44 -0400 Received: from terminus.zytor.com ([65.50.211.136]:41273 "EHLO terminus.zytor.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751299AbdH2O2m (ORCPT ); Tue, 29 Aug 2017 10:28:42 -0400 Date: Tue, 29 Aug 2017 07:25:05 -0700 From: tip-bot for Peter Zijlstra Message-ID: Cc: mingo@kernel.org, torvalds@linux-foundation.org, tglx@linutronix.de, linux-kernel@vger.kernel.org, hpa@zytor.com, peterz@infradead.org Reply-To: linux-kernel@vger.kernel.org, torvalds@linux-foundation.org, tglx@linutronix.de, mingo@kernel.org, peterz@infradead.org, hpa@zytor.com In-Reply-To: <20170828124245.xlo2yshxq2btgmuf@hirez.programming.kicks-ass.net> References: <20170828124245.xlo2yshxq2btgmuf@hirez.programming.kicks-ass.net> To: linux-tip-commits@vger.kernel.org Subject: [tip:locking/core] locking/lockdep/selftests: Fix mixed read-write ABBA tests Git-Commit-ID: d82fed75294229abc9d757f08a4817febae6c4f4 X-Mailer: tip-git-log-daemon Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset=UTF-8 Content-Disposition: inline Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Commit-ID: d82fed75294229abc9d757f08a4817febae6c4f4 Gitweb: http://git.kernel.org/tip/d82fed75294229abc9d757f08a4817febae6c4f4 Author: Peter Zijlstra AuthorDate: Mon, 28 Aug 2017 14:42:45 +0200 Committer: Ingo Molnar CommitDate: Tue, 29 Aug 2017 15:15:17 +0200 locking/lockdep/selftests: Fix mixed read-write ABBA tests Commit: e91498589746 ("locking/lockdep/selftests: Add mixed read-write ABBA tests") adds an explicit FAILURE to the locking selftest but overlooked the fact that this kills lockdep. Fudge the test to avoid this. Signed-off-by: Peter Zijlstra (Intel) Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: hpa@zytor.com Link: http://lkml.kernel.org/r/20170828124245.xlo2yshxq2btgmuf@hirez.programming.kicks-ass.net Signed-off-by: Ingo Molnar --- lib/locking-selftest.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/lib/locking-selftest.c b/lib/locking-selftest.c index 3c7151a..cd0b5c9 100644 --- a/lib/locking-selftest.c +++ b/lib/locking-selftest.c @@ -2031,6 +2031,12 @@ void locking_selftest(void) print_testname("mixed read-lock/lock-write ABBA"); pr_cont(" |"); dotest(rlock_ABBA1, FAILURE, LOCKTYPE_RWLOCK); + /* + * Lockdep does indeed fail here, but there's nothing we can do about + * that now. Don't kill lockdep for it. + */ + unexpected_testcase_failures--; + pr_cont(" |"); dotest(rwsem_ABBA1, FAILURE, LOCKTYPE_RWSEM);