All of lore.kernel.org
 help / color / mirror / Atom feed
From: Steven Rostedt <rostedt@goodmis.org>
To: Hui Wang <hui.wang@canonical.com>
Cc: mhiramat@kernel.org, mathieu.desnoyers@efficios.com,
	pjw@kernel.org, linux-trace-kernel@vger.kernel.org,
	shuah@kernel.org, wangfushuai@baidu.com,
	linux-kselftest@vger.kernel.org
Subject: Re: [PATCH 2/2] selftests/ftrace: Account for 8-byte aligned trace_marker_raw events
Date: Mon, 8 Jun 2026 12:50:49 -0400	[thread overview]
Message-ID: <20260608125049.092d4543@fedora> (raw)
In-Reply-To: <20260607072431.125633-3-hui.wang@canonical.com>

On Sun,  7 Jun 2026 15:24:31 +0800
Hui Wang <hui.wang@canonical.com> wrote:

> trace_marker_raw.tc assumes that the raw marker payload length
> reported in trace_pipe is the result of int((id + 3) / 4) * 4, but
> that is not true on kernels with CONFIG_HAVE_64BIT_ALIGNED_ACCESS
> enabled.
> 
> With forced 8-byte alignment, the ring buffer event forces 8-byte
> alignment. The event length is stored in array[0], the payload data
> and id are placed in a struct raw_data_entry which is stored starting
> at array[1]. In this case, the printed payload data length is 8*N+4
> bytes.
> 
> To make the testcase pass in this case, add a kconfig_enabled() helper
> and use it to detect CONFIG_HAVE_64BIT_ALIGNED_ACCESS so
> trace_marker_raw.tc can calculate the expected length correctly.
> 
> Assisted-by: Copilot:gpt-5.5
> Signed-off-by: Hui Wang <hui.wang@canonical.com>

NACK

Let's not change the kernel for a broken test. Also this has already
been fixed but appears not to be applied yet.

Shuah, can you please apply the below fix.

  https://lore.kernel.org/all/20260601023251.1916483-1-dtcccc@linux.alibaba.com/

-- Steve


      parent reply	other threads:[~2026-06-08 16:51 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-06-07  7:24 [PATCH 0/2] ring-buffer: Fix forced 8-byte alignment event length Hui Wang
2026-06-07  7:24 ` [PATCH 1/2] ring-buffer: Fix event length with forced 8-byte alignment Hui Wang
2026-06-08  9:02   ` Masami Hiramatsu
2026-06-08 16:52     ` Steven Rostedt
2026-06-07  7:24 ` [PATCH 2/2] selftests/ftrace: Account for 8-byte aligned trace_marker_raw events Hui Wang
2026-06-08  9:17   ` Masami Hiramatsu
2026-06-08 14:51     ` Hui Wang
2026-06-08 16:50   ` 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=20260608125049.092d4543@fedora \
    --to=rostedt@goodmis.org \
    --cc=hui.wang@canonical.com \
    --cc=linux-kselftest@vger.kernel.org \
    --cc=linux-trace-kernel@vger.kernel.org \
    --cc=mathieu.desnoyers@efficios.com \
    --cc=mhiramat@kernel.org \
    --cc=pjw@kernel.org \
    --cc=shuah@kernel.org \
    --cc=wangfushuai@baidu.com \
    /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.