summaryrefslogtreecommitdiff
path: root/tools/perf/tests/shell/lib/perf_json_output_lint.py
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2024-12-05 18:09:29 +0100
committerTakashi Iwai <tiwai@suse.de>2024-12-05 18:09:29 +0100
commitc34e9ab9a612ee8b18273398ef75c207b01f516d (patch)
tree6845a1809118a2b2a21d5a638ace1976dd8f8c46 /tools/perf/tests/shell/lib/perf_json_output_lint.py
parent20c3b3e5f2641eff3d85f33e6a468ac052b169bd (diff)
parentec16a3cdf37e507013062f9c4a2067eacdd12b62 (diff)
Merge tag 'asoc-fix-v6.13-rc1' of https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into for-linus
ASoC: Fixes for v6.13 A few small fixes for v6.13, all system specific - the biggest thing is the fix for jack handling over suspend on some Intel laptops.
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.py5
1 files changed, 4 insertions, 1 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 abc1fd737782..8ddb85586131 100644
--- a/tools/perf/tests/shell/lib/perf_json_output_lint.py
+++ b/tools/perf/tests/shell/lib/perf_json_output_lint.py
@@ -57,6 +57,7 @@ def check_json_output(expected_items):
'interval': lambda x: isfloat(x),
'metric-unit': lambda x: True,
'metric-value': lambda x: isfloat(x),
+ 'metric-threshold': lambda x: x in ['unknown', 'good', 'less good', 'nearly bad', 'bad'],
'metricgroup': lambda x: True,
'node': lambda x: True,
'pcnt-running': lambda x: isfloat(x),
@@ -68,13 +69,15 @@ def check_json_output(expected_items):
for item in json.loads(input):
if expected_items != -1:
count = len(item)
- if count != expected_items and count >= 1 and count <= 6 and 'metric-value' in item:
+ if count != expected_items and count >= 1 and count <= 7 and 'metric-value' in item:
# Events that generate >1 metric may have isolated metric
# values and possibly other prefixes like interval, core,
# aggregate-number, or event-runtime/pcnt-running from multiplexing.
pass
elif count != expected_items and count >= 1 and count <= 5 and 'metricgroup' in item:
pass
+ elif count == expected_items + 1 and 'metric-threshold' in item:
+ pass
elif count != expected_items:
raise RuntimeError(f'wrong number of fields. counted {count} expected {expected_items}'
f' in \'{item}\'')