From: Steven Rostedt <rostedt@kernel.org>
To: "Masami Hiramatsu (Google)" <mhiramat@kernel.org>
Cc: linux-kernel@vger.kernel.org, linux-trace-kernel@vger.kernel.org,
linux-kselftest@vger.kernel.org,
Mark Rutland <mark.rutland@arm.com>,
Mathieu Desnoyers <mathieu.desnoyers@efficios.com>,
Andrew Morton <akpm@linux-foundation.org>,
Shuah Khan <skhan@linuxfoundation.org>
Subject: Re: [PATCH 1/2] tracing/selftests: Fix instance test to actually test races
Date: Thu, 29 Oct 2026 21:20:55 -0400 [thread overview]
Message-ID: <20261029212055.41a6141f@fedora> (raw)
In-Reply-To: <undine-1793322079170721165-fee1052e7bb8c899@undined.local>
On Fri, 30 Oct 2026 10:01:19 +0900
"Masami Hiramatsu (Google)" <mhiramat@kernel.org> wrote:
> > instance_slam() {
> > - while :; do
> > - mkdir foo 2> /dev/null
> > - rmdir foo 2> /dev/null
> > - done
> > + mkdir foo 2> /dev/null
> > + while ! rmdir foo; do
> > + echo could not rmdir foo
>
> nit: If we retry this, do we need to warn it?
> (maybe we can add a limitation of continuous failure and make the
> test fail if the failure exceeds it.)
Retrying is actually quite normal. The rmdir *should* fail if one of
the instance files is open.
Now perhaps we can add a counter to make it fail if it exceeds a large
threshold?
let x=0
while ! rmdir foo; do
let x=$x+1
if [ $x -gt 10000 ]; then
exit_fail
fi
done
?
-- Steve
next prev parent reply other threads:[~2026-10-30 1:21 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-29 20:28 [PATCH 0/2] testing/selftests: Have instance test stress instances more Steven Rostedt
2026-10-29 20:28 ` [PATCH 1/2] tracing/selftests: Fix instance test to actually test races Steven Rostedt
2026-10-30 1:01 ` Masami Hiramatsu (Google)
2026-10-30 1:20 ` Steven Rostedt [this message]
2026-10-29 20:28 ` [PATCH 2/2] tracing/selftests: Add reading all instance files to instance test Steven Rostedt
2026-10-30 1:24 ` Masami Hiramatsu (Google)
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=20261029212055.41a6141f@fedora \
--to=rostedt@kernel.org \
--cc=akpm@linux-foundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-kselftest@vger.kernel.org \
--cc=linux-trace-kernel@vger.kernel.org \
--cc=mark.rutland@arm.com \
--cc=mathieu.desnoyers@efficios.com \
--cc=mhiramat@kernel.org \
--cc=skhan@linuxfoundation.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®