[RFC PATCH v2 08/14] perf stat: Extend CSV output linter to test core aggregation checks
From: Ian Rogers
Date: Mon May 25 2026 - 19:20:13 EST
This patch extends tools/perf/tests/shell/stat+csv_output.sh to run all
basic and core aggregation linter checks a second time under the --new
CSV print flag:
- check_no_args
- check_system_wide
- check_interval
- check_event
- check_per_thread
- check_per_node
- check_system_wide_no_aggr
- check_per_core
- check_per_socket
- check_per_die
This guarantees that CSV outputs produced by the decoupled printing engine
are formally verified and column-valid across standard and interval modes.
Signed-off-by: Ian Rogers <irogers@xxxxxxxxxx>
Assisted-by: Antigravity:gemini-3.5-flash
---
tools/perf/tests/shell/stat+csv_output.sh | 16 ++++++++++++++++
1 file changed, 16 insertions(+)
diff --git a/tools/perf/tests/shell/stat+csv_output.sh b/tools/perf/tests/shell/stat+csv_output.sh
index cd6fff597091..e4153a03d716 100755
--- a/tools/perf/tests/shell/stat+csv_output.sh
+++ b/tools/perf/tests/shell/stat+csv_output.sh
@@ -88,5 +88,21 @@ 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 CSV checks
+perf_cmd="--new -x$csv_sep -o ${stat_output}"
+check_no_args "CSV (New API)" "$perf_cmd"
+check_system_wide "CSV (New API)" "$perf_cmd"
+check_interval "CSV (New API)" "$perf_cmd"
+check_event "CSV (New API)" "$perf_cmd"
+check_per_thread "CSV (New API)" "$perf_cmd"
+check_per_node "CSV (New API)" "$perf_cmd"
+if [ $skip_test -ne 1 ]
+then
+ check_system_wide_no_aggr "CSV (New API)" "$perf_cmd"
+ check_per_core "CSV (New API)" "$perf_cmd"
+ check_per_die "CSV (New API)" "$perf_cmd"
+ check_per_socket "CSV (New API)" "$perf_cmd"
+fi
+
cleanup
exit 0
--
2.54.0.794.g4f17f83d09-goog