All of lore.kernel.org
 help / color / mirror / Atom feed
From: tip-bot for Peter Zijlstra <tipbot@zytor.com>
To: linux-tip-commits@vger.kernel.org
Cc: mingo@kernel.org, torvalds@linux-foundation.org,
	tglx@linutronix.de, linux-kernel@vger.kernel.org, hpa@zytor.com,
	peterz@infradead.org
Subject: [tip:locking/core] locking/lockdep/selftests: Fix mixed read-write ABBA tests
Date: Tue, 29 Aug 2017 07:25:05 -0700	[thread overview]
Message-ID: <tip-d82fed75294229abc9d757f08a4817febae6c4f4@git.kernel.org> (raw)
In-Reply-To: <20170828124245.xlo2yshxq2btgmuf@hirez.programming.kicks-ass.net>

Commit-ID:  d82fed75294229abc9d757f08a4817febae6c4f4
Gitweb:     http://git.kernel.org/tip/d82fed75294229abc9d757f08a4817febae6c4f4
Author:     Peter Zijlstra <peterz@infradead.org>
AuthorDate: Mon, 28 Aug 2017 14:42:45 +0200
Committer:  Ingo Molnar <mingo@kernel.org>
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) <peterz@infradead.org>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: hpa@zytor.com
Link: http://lkml.kernel.org/r/20170828124245.xlo2yshxq2btgmuf@hirez.programming.kicks-ass.net
Signed-off-by: Ingo Molnar <mingo@kernel.org>
---
 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);
 

      reply	other threads:[~2017-08-29 14:28 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <tip-e91498589746065e3ae95d9a00b068e525eec34f@git.kernel.org>
2017-08-28 12:42 ` [tip:locking/core] locking/lockdep/selftests: Add mixed read-write ABBA tests Peter Zijlstra
2017-08-29 14:25   ` tip-bot for Peter Zijlstra [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=tip-d82fed75294229abc9d757f08a4817febae6c4f4@git.kernel.org \
    --to=tipbot@zytor.com \
    --cc=hpa@zytor.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-tip-commits@vger.kernel.org \
    --cc=mingo@kernel.org \
    --cc=peterz@infradead.org \
    --cc=tglx@linutronix.de \
    --cc=torvalds@linux-foundation.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.