aboutsummaryrefslogtreecommitdiffstats
path: root/tools/perf/tests/shell/lib/perf_json_output_lint.py
diff options
context:
space:
mode:
authorKan Liang <[email protected]>2023-06-07 16:26:59 +0000
committerArnaldo Carvalho de Melo <[email protected]>2023-06-14 02:40:34 +0000
commite2595550177d8ea42083c9fd8e8a9d4acd5604ec (patch)
tree695d12b24531eb46d6fee32ac9395fd7d1192020 /tools/perf/tests/shell/lib/perf_json_output_lint.py
parentperf tests task_analyzer: Skip tests if no libtraceevent support (diff)
downloadkernel-e2595550177d8ea42083c9fd8e8a9d4acd5604ec.tar.gz
kernel-e2595550177d8ea42083c9fd8e8a9d4acd5604ec.zip
pert tests: Support metricgroup perf stat JSON output
A new field metricgroup has been added in the perf stat JSON output. Support it in the test case. Signed-off-by: Kan Liang <[email protected]> Acked-by: Ian Rogers <[email protected]> Cc: Adrian Hunter <[email protected]> Cc: Ahmad Yasin <[email protected]> Cc: Andi Kleen <[email protected]> Cc: Ingo Molnar <[email protected]> Cc: Jiri Olsa <[email protected]> Cc: Namhyung Kim <[email protected]> Cc: Peter Zijlstra <[email protected]> Cc: Stephane Eranian <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Arnaldo Carvalho de Melo <[email protected]>
Diffstat (limited to 'tools/perf/tests/shell/lib/perf_json_output_lint.py')
-rw-r--r--tools/perf/tests/shell/lib/perf_json_output_lint.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/tools/perf/tests/shell/lib/perf_json_output_lint.py b/tools/perf/tests/shell/lib/perf_json_output_lint.py
index b81582a89d36..5e9bd68c83fe 100644
--- a/tools/perf/tests/shell/lib/perf_json_output_lint.py
+++ b/tools/perf/tests/shell/lib/perf_json_output_lint.py
@@ -55,6 +55,7 @@ def check_json_output(expected_items):
'interval': lambda x: isfloat(x),
'metric-unit': lambda x: True,
'metric-value': lambda x: isfloat(x),
+ 'metricgroup': lambda x: True,
'node': lambda x: True,
'pcnt-running': lambda x: isfloat(x),
'socket': lambda x: True,
@@ -70,6 +71,8 @@ def check_json_output(expected_items):
# values and possibly other prefixes like interval, core and
# aggregate-number.
pass
+ elif count != expected_items and count >= 1 and count <= 5 and 'metricgroup' in item:
+ pass
elif count != expected_items:
raise RuntimeError(f'wrong number of fields. counted {count} expected {expected_items}'
f' in \'{item}\'')