mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Steven Rostedt <rostedt@goodmis.org>
To: CaoRuichuang <create0818@163.com>
Cc: mhiramat@kernel.org, mathieu.desnoyers@efficios.com,
	shuah@kernel.org, linux-kernel@vger.kernel.org,
	linux-trace-kernel@vger.kernel.org,
	linux-kselftest@vger.kernel.org
Subject: Re: [PATCH] selftests/ftrace: Check exact trace_marker_raw payload lengths
Date: Tue, 7 Apr 2026 12:54:24 -0400	[thread overview]
Message-ID: <20260407125424.7c2d88ea@gandalf.local.home> (raw)
In-Reply-To: <20260407101245.78988-1-create0818@163.com>

On Tue,  7 Apr 2026 18:12:45 +0800
CaoRuichuang <create0818@163.com> wrote:

> From: Cao Ruichuang <create0818@163.com>
> 
> trace_marker_raw.tc currently depends on awk strtonum() and
> assumes that the printed raw-data byte count is rounded up to four
> bytes.
> 
> That makes the test fail on systems that use mawk, and it no longer
> matches the raw_data trace output we want to validate after preserving
> true payload lengths for long records.
> 
> Rewrite the test to capture a small sequence of raw marker writes and
> check the exact number of printed payload bytes in order. While doing
> that, use od for the endian probe, switch to a fixed raw marker id so
> the test only varies payload length, and disable pause-on-trace while
> streaming trace_pipe.
> 

The tests are to validate the code and if the tests fail when the code is
working as designed, it is the test that is at fault, and the fix is to fix
the tests. Not to make the code match the test.

-- Steve

      parent reply	other threads:[~2026-04-07 16:53 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-04-07 10:12 CaoRuichuang
2026-04-07 16:45 ` Cao Ruichuang
2026-04-07 16:54 ` 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=20260407125424.7c2d88ea@gandalf.local.home \
    --to=rostedt@goodmis.org \
    --cc=create0818@163.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

all inboxes | Powered by JetHome®