From: Haakon Bugge <haakon.bugge@oracle.com>
To: John Stultz <jstultz@google.com>
Cc: "linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
Peter Zijlstra <peterz@infradead.org>,
Ingo Molnar <mingo@redhat.com>, Will Deacon <will@kernel.org>,
Boqun Feng <boqun@kernel.org>, Waiman Long <longman@redhat.com>,
Andrew Morton <akpm@linux-foundation.org>,
Shuah Khan <shuah@kernel.org>,
"linux-kselftest@vger.kernel.org"
<linux-kselftest@vger.kernel.org>
Subject: Re: [PATCH 1/1] kernel/locking: Add mutual exclusion self-test
Date: Mon, 24 Aug 2026 12:29:14 +0000 [thread overview]
Message-ID: <2FB8E129-0EC5-4593-9853-D528854AAA4B@oracle.com> (raw)
In-Reply-To: <CANDhNCoPDZeXXGn-hKZ_jgE8gkELEaufDXDYWV=hqLWxtD6gJg@mail.gmail.com>
> On 21 Aug 2026, at 22:42, John Stultz <jstultz@google.com> wrote:
>
> On Mon, Aug 17, 2026 at 6:03 AM Håkon Bugge <haakon.bugge@oracle.com> wrote:
> > diff --git a/kernel/locking/Makefile b/kernel/locking/Makefile
> > index cee1901d4cff8..240084b4abbb7 100644
> > --- a/kernel/locking/Makefile
> > +++ b/kernel/locking/Makefile
> > @@ -38,3 +38,4 @@ obj-$(CONFIG_QUEUED_RWLOCKS) += qrwlock.o
> > obj-$(CONFIG_LOCK_TORTURE_TEST) += locktorture.o
> > obj-$(CONFIG_WW_MUTEX_SELFTEST) += test-ww_mutex.o
> > obj-$(CONFIG_LOCK_EVENT_COUNTS) += lock_events.o
> > +obj-$(CONFIG_MX_TEST) += mx_test.o
>
> Total bikeshed item, but both CONFIG_MX_TEST and mx_test are not very
> obvious names for someone looking at this make file.
I am terrible with names. It's short for Mutual eXclusion. Can of course
be spelled out if preferred.
[snip]
> Apologies, I've not had a chance to apply and try this yet.
NP.
> So this looks like the test has to be run via module load?
It can be run built-in as well, but then only the default test is run.
> I almost
> never use modules in my test environment, so its often nice to allow
> it to be built in and be triggered/re-triggered without having to
> unload/reload (assuming this is not something like locktorture which
> never finishes - and if that is the case, it might be good to
> integrate into the locktorture framework instead of adding a new one).
No, this selftest terminates.
The script, tools/testing/selftests/locking/mx_test.sh, is written to
be robust wrt. module load/unload failures. The reason I prefer to run
it as module, is the turn-around time. From an edit, it takes
literally only a second to compile the module out-of-tree, another
second to copy it to the *updates* on the test server.
But if the community prefers that all the tests are run when the test
is built-in, the loop looping though the eligible tests can be moved
from the script to the C source instead.
Thxs, Håkon
next prev parent reply other threads:[~2026-08-24 12:29 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-17 13:02 [PATCH 0/1] " Håkon Bugge
2026-08-17 13:02 ` [PATCH 1/1] " Håkon Bugge
2026-08-21 20:42 ` John Stultz
2026-08-24 12:29 ` Haakon Bugge [this message]
2026-08-24 21:48 ` John Stultz
2026-08-25 16:12 ` Haakon Bugge
2026-09-14 9:35 ` David Laight
2026-09-14 12:32 ` Haakon Bugge
2026-09-14 17:21 ` Haakon Bugge
2026-09-14 21:40 ` David Laight
2026-09-21 15:52 ` Haakon Bugge
2026-08-18 7:54 ` [PATCH 0/1] " Peter Zijlstra
2026-08-18 8:14 ` Haakon Bugge
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=2FB8E129-0EC5-4593-9853-D528854AAA4B@oracle.com \
--to=haakon.bugge@oracle.com \
--cc=akpm@linux-foundation.org \
--cc=boqun@kernel.org \
--cc=jstultz@google.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-kselftest@vger.kernel.org \
--cc=longman@redhat.com \
--cc=mingo@redhat.com \
--cc=peterz@infradead.org \
--cc=shuah@kernel.org \
--cc=will@kernel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®