Re: [RFC PATCH v2 03/14] perf stat: Extend STD output linter to test basic New API checks
From: Arnaldo Carvalho de Melo
Date: Mon May 25 2026 - 19:39:51 EST
On Mon, May 25, 2026 at 04:18:49PM -0700, Ian Rogers wrote:
> This patch extends the standard console (STD) output linter script
> tools/perf/tests/shell/stat+std_output.sh to run the basic no-argument
> check a second time using the --new print flag:
>
> perf_cmd="--new -o ${stat_output}"
> check_no_args "STD (New API)" "$perf_cmd"
>
> This ensures that standard console outputs produced by the decoupled
> printing callbacks are formally validated by the test suite.
>
> Signed-off-by: Ian Rogers <irogers@xxxxxxxxxx>
> Assisted-by: Antigravity:gemini-3.5-flash
Acked-by: Arnaldo Carvalho de Melo <acme@xxxxxxxxxx>
> ---
> tools/perf/tests/shell/stat+std_output.sh | 4 ++++
> 1 file changed, 4 insertions(+)
>
> diff --git a/tools/perf/tests/shell/stat+std_output.sh b/tools/perf/tests/shell/stat+std_output.sh
> index 9c4b92ecf448..233e0a50eb33 100755
> --- a/tools/perf/tests/shell/stat+std_output.sh
> +++ b/tools/perf/tests/shell/stat+std_output.sh
> @@ -118,5 +118,9 @@ then
> else
> echo "[Skip] Skipping tests for system_wide_no_aggr, per_core, per_die and per_socket since socket id exposed via topology is invalid"
> fi
> +# New API basic checks
> +perf_cmd="--new -o ${stat_output}"
> +check_no_args "STD (New API)" "$perf_cmd"
> +
> cleanup
> exit 0
> --
> 2.54.0.794.g4f17f83d09-goog
>