Re: [PATCH v4 06/14] perf stat: Extend STD output linter to test metric-only checks
From: Namhyung Kim
Date: Thu Jul 16 2026 - 18:32:13 EST
On Thu, Jul 16, 2026 at 12:02:55AM -0700, Ian Rogers wrote:
> This patch extends tools/perf/tests/shell/stat+std_output.sh to run the
> metric-only check under the --new print flag:
>
> - check_metric_only
>
> This guarantees that standard console metric-only outputs produced by
> the decoupled printing callbacks are formally validated by the test
> linter.
>
> Signed-off-by: Ian Rogers <irogers@xxxxxxxxxx>
> Assisted-by: Antigravity:gemini-3.5-flash
> Acked-by: Chun-Tse Shao <ctshao@xxxxxxxxxx>
Can you please combine test changes into a commit? I guess it's ok to
have separate one for std, csv and json. But I'm seeing this as a
temporary changes and we will remove it once we switch to the new way.
Thanks,
Namhyung
> ---
> tools/perf/tests/shell/stat+std_output.sh | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/tools/perf/tests/shell/stat+std_output.sh b/tools/perf/tests/shell/stat+std_output.sh
> index 0d38a1283967..69720b19b908 100755
> --- a/tools/perf/tests/shell/stat+std_output.sh
> +++ b/tools/perf/tests/shell/stat+std_output.sh
> @@ -134,6 +134,7 @@ then
> check_per_cache_instance "STD (New API)" "$perf_cmd"
> check_per_cluster "STD (New API)" "$perf_cmd"
> fi
> +check_metric_only "STD (New API)" "$perf_cmd"
>
> cleanup
> exit 0
> --
> 2.55.0.141.g00534a21ce-goog
>