mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH 0/2] perf trace: Improve augmented buf output formatting, fix test output
@ 2026-12-02 12:16 Marek Pazur
  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
  0 siblings, 2 replies; 3+ messages in thread
From: Marek Pazur @ 2026-12-02 12:16 UTC (permalink / raw)
  To: Arnaldo Carvalho de Melo, Namhyung Kim
  Cc: Jiri Olsa, Ian Rogers, Adrian Hunter, Howard Chu,
	linux-perf-users, linux-kernel

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


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2026-12-02 12:16 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-12-02 12:16 [PATCH 0/2] perf trace: Improve augmented buf output formatting, fix test output Marek Pazur
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

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®