From: Marek Pazur <mpazur@redhat.com>
To: Arnaldo Carvalho de Melo <acme@kernel.org>,
Namhyung Kim <namhyung@kernel.org>
Cc: Jiri Olsa <jolsa@kernel.org>, Ian Rogers <irogers@google.com>,
Adrian Hunter <adrian.hunter@intel.com>,
Howard Chu <howardchu95@gmail.com>,
linux-perf-users@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: [PATCH 0/2] perf trace: Improve augmented buf output formatting, fix test output
Date: Wed, 2 Dec 2026 13:16:20 +0100 [thread overview]
Message-ID: <20261202121622.30071-1-mpazur@redhat.com> (raw)
Currently, perf trace prints augmented buf arguments without delimiters
or backslash escaping. When buffer payloads contain commas, quotes,
or escape-like sequences, the output becomes ambiguous to parse
reliably in automated tests. Additionally, the buffer augmentation
shell test passes captured perf trace output directly into printf's
format string, causing non-printable decimal escapes (such as "\10")
to be misinterpreted and corrupt failure logs.
This series addresses both issues:
- Patch 1 fixes printf format-string expansion in the buffer
augmentation shell test by passing trace output via "%s".
- Patch 2 encloses augmented buf output in double quotes and escapes
'"' and '\' and updates the buffer augmentation shell tests
accordingly.
Marek Pazur (2):
perf test trace_btf_general: Use %s format specifier when printing
test output
perf trace: Quote and escape augmented buffer contents
tools/perf/builtin-trace.c | 14 ++++++++++++--
tools/perf/tests/shell/trace_btf_general.sh | 8 ++++----
2 files changed, 16 insertions(+), 6 deletions(-)
--
2.55.0
next reply other threads:[~2026-12-02 12:16 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-12-02 12:16 Marek Pazur [this message]
2026-12-02 12:16 ` [PATCH 1/2] perf test trace_btf_general: Use %s format specifier when printing " Marek Pazur
2026-12-02 12:16 ` [PATCH 2/2] perf trace: Quote and escape augmented buffer contents Marek Pazur
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=20261202121622.30071-1-mpazur@redhat.com \
--to=mpazur@redhat.com \
--cc=acme@kernel.org \
--cc=adrian.hunter@intel.com \
--cc=howardchu95@gmail.com \
--cc=irogers@google.com \
--cc=jolsa@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-perf-users@vger.kernel.org \
--cc=namhyung@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®