From: Steven Rostedt <rostedt@goodmis.org>
To: Tianchen Ding <dtcccc@linux.alibaba.com>
Cc: Masami Hiramatsu <mhiramat@kernel.org>,
Mathieu Desnoyers <mathieu.desnoyers@efficios.com>,
Shuah Khan <shuah@kernel.org>,
linux-kernel@vger.kernel.org, linux-trace-kernel@vger.kernel.org,
linux-kselftest@vger.kernel.org
Subject: Re: [PATCH v2] selftests/ftrace: Fix trace_marker_raw test on 64K page kernels
Date: Thu, 28 May 2026 09:13:48 -0400 [thread overview]
Message-ID: <20260528091348.71ae3aa3@fedora> (raw)
In-Reply-To: <20260528022417.1813745-1-dtcccc@linux.alibaba.com>
On Thu, 28 May 2026 10:24:17 +0800
Tianchen Ding <dtcccc@linux.alibaba.com> wrote:
>
> diff --git a/tools/testing/selftests/ftrace/test.d/00basic/trace_marker_raw.tc b/tools/testing/selftests/ftrace/test.d/00basic/trace_marker_raw.tc
> index 8e905d4fe6dd..f68f1901f65f 100644
> --- a/tools/testing/selftests/ftrace/test.d/00basic/trace_marker_raw.tc
> +++ b/tools/testing/selftests/ftrace/test.d/00basic/trace_marker_raw.tc
> @@ -43,8 +43,11 @@ write_buffer() {
> id=$1
> size=$2
>
> - # write the string into the raw marker
> - make_str $id $size > trace_marker_raw
> + # Pipe through dd to ensure a single atomic write() syscall
> + # on architectures with 64K pages, where shell's printf builtin
> + # uses stdio buffering which may split the output into multiple
> + # writes.
> + make_str $id $size | dd of=trace_marker_raw bs=`expr $size + 4` iflag=fullblock
I was looking at this more, and I'm not comfortable with the hard coded
4 above. I rather use the length of the string. Something like:
str=`make_str $id $size`
len=${#str}
echo "$str" | dd of=trace_marker_raw bs=$len iflag=fullblock
-- Steve
> }
>
>
prev parent reply other threads:[~2026-05-28 13:13 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-05-27 9:54 [PATCH] selftests/ftrace: Fix trace_marker_raw test on 64K page kernels Tianchen Ding
2026-05-27 14:09 ` Steven Rostedt
2026-05-28 2:24 ` [PATCH v2] " Tianchen Ding
2026-05-28 13:13 ` Steven Rostedt [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=20260528091348.71ae3aa3@fedora \
--to=rostedt@goodmis.org \
--cc=dtcccc@linux.alibaba.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-kselftest@vger.kernel.org \
--cc=linux-trace-kernel@vger.kernel.org \
--cc=mathieu.desnoyers@efficios.com \
--cc=mhiramat@kernel.org \
--cc=shuah@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