linux/tools/perf/tests/shell/lib
Ian Rogers 1331150d7d perf test: Clean up mypy and pylint issues in shell test libraries
Clean up mypy type errors and pylint errors/warnings in
tools/perf/tests/shell/lib/ (attr.py, perf_json_output_lint.py, and
perf_metric_validation.py):
- Fix E0606 (possibly-used-before-assignment) in perf_metric_validation.py
  by importing sys at module level.
- Add type annotations for stack, second_results, collectlist,
  get_bounds(), and main() in perf_metric_validation.py.
- Avoid assigning -1 to list[int] expected_items in
  perf_json_output_lint.py, rename shadowing variables, and remove
  redundant lambdas.
- Remove unnecessary semicolons, use lazy logging arguments, specify
  exception types and file encodings, and initialize module-level logger
  in attr.py.

Also update tools/perf/tests/shell/lib/setup_python.sh to:
- Avoid x-prefix string comparisons.
- Export PYTHON and resolve PYTHONPATH and PERF_EXEC_PATH from
  BASH_SOURCE[0], ../../../python (for nested test directories such as
  coresight/), and the directory containing the perf binary so out-of-tree
  builds and standalone perf python scripts work seamlessly.

Assisted-by: Antigravity:gemini-3.1-pro
Signed-off-by: Ian Rogers <irogers@google.com>
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
2026-09-26 20:49:28 +02:00
..
attr.py perf test: Clean up mypy and pylint issues in shell test libraries 2026-09-26 20:49:28 +02:00
perf_has_symbol.sh perf test: Change all remaining #!/bin/sh to #!/bin/bash 2025-06-26 10:31:05 -07:00
perf_json_output_lint.py perf test: Clean up mypy and pylint issues in shell test libraries 2026-09-26 20:49:28 +02:00
perf_metric_validation_rules.json perf test: Add skip list for metrics known would fail 2023-06-21 22:23:57 -07:00
perf_metric_validation.py perf test: Clean up mypy and pylint issues in shell test libraries 2026-09-26 20:49:28 +02:00
perf_record.sh perf test: Fix errors when deleting data in 'perf record' tests 2026-09-25 12:48:04 +02:00
probe_vfs_getname.sh perf test: Change all remaining #!/bin/sh to #!/bin/bash 2025-06-26 10:31:05 -07:00
probe.sh perf tests lib probe: Fix shellcheck warning about about missing shebang 2023-08-03 17:01:26 -03:00
setup_python.sh perf test: Clean up mypy and pylint issues in shell test libraries 2026-09-26 20:49:28 +02:00
stat_output.sh perf test stat csv: Update test expectations and events 2025-11-11 16:48:36 -08:00
waiting.sh perf test waiting.sh: Replace timestamp polling with sleep 2026-09-08 18:06:01 -03:00