v2 changes since v1:
- Restructure as 2 commits (prefix.py alone; the 4 check_*.py together,
since their callers are heavily intermingled)
- Update runner.sh and kselftest/Makefile to invoke/install prefix.py
- Update Makefile.perf to install *.py (not just *.sh/*.pl)
- Update all call sites in base_probe/ and base_report/
- Remove the 5 original .pl files
- Add trailing newlines to all 5 files (pylint C0304)
- Fix the check_all_patterns_found commit message:
TESTLOG_ERR_MSG_MAX_LINES is only handled by check_all_lines_matched
This series converts five Perl test helpers in tools/ to Python 3,
continuing the Perl-to-Python conversion effort for the kernel's
auxiliary scripts.
Each conversion is a faithful 1:1 port: same CLI, same output,
same exit codes. All use only the Python standard library.
The five scripts are:
- prefix.pl -> prefix.py
- check_all_patterns_found.pl -> check_all_patterns_found.py
- check_no_patterns_found.pl -> check_no_patterns_found.py
- check_all_lines_matched.pl -> check_all_lines_matched.py
- check_errors_whitelisted.pl -> check_errors_whitelisted.py
All five were verified byte-for-byte identical to their Perl
counterparts on synthetic inputs.
Breno Rodrigues Alves (2):
perf/kselftest: convert prefix.pl to Python
perf/tests: convert check_*.pl helpers to Python
Breno Rodrigues Alves (2):
perf/kselftest: convert prefix.pl to Python
perf/tests: convert check_*.pl helpers to Python
tools/perf/Makefile.perf | 2 +-
.../base_probe/test_adding_blacklisted.sh | 6 +-
.../shell/base_probe/test_adding_kernel.sh | 44 +++++++--------
.../perf/tests/shell/base_probe/test_basic.sh | 12 ++--
.../shell/base_probe/test_invalid_options.sh | 4 +-
tools/perf/tests/shell/base_report/setup.sh | 4 +-
.../tests/shell/base_report/test_basic.sh | 54 +++++++++---------
.../shell/common/check_all_lines_matched.pl | 39 -------------
.../shell/common/check_all_lines_matched.py | 45 +++++++++++++++
.../shell/common/check_all_patterns_found.pl | 34 ------------
.../shell/common/check_all_patterns_found.py | 35 ++++++++++++
.../shell/common/check_errors_whitelisted.pl | 51 -----------------
.../shell/common/check_errors_whitelisted.py | 55 +++++++++++++++++++
.../shell/common/check_no_patterns_found.pl | 34 ------------
.../shell/common/check_no_patterns_found.py | 35 ++++++++++++
tools/testing/selftests/Makefile | 2 +-
tools/testing/selftests/kselftest/prefix.pl | 24 --------
tools/testing/selftests/kselftest/prefix.py | 24 ++++++++
tools/testing/selftests/kselftest/runner.sh | 7 +--
19 files changed, 260 insertions(+), 251 deletions(-)
delete mode 100755 tools/perf/tests/shell/common/check_all_lines_matched.pl
create mode 100755 tools/perf/tests/shell/common/check_all_lines_matched.py
delete mode 100755 tools/perf/tests/shell/common/check_all_patterns_found.pl
create mode 100755 tools/perf/tests/shell/common/check_all_patterns_found.py
delete mode 100755 tools/perf/tests/shell/common/check_errors_whitelisted.pl
create mode 100755 tools/perf/tests/shell/common/check_errors_whitelisted.py
delete mode 100755 tools/perf/tests/shell/common/check_no_patterns_found.pl
create mode 100755 tools/perf/tests/shell/common/check_no_patterns_found.py
delete mode 100755 tools/testing/selftests/kselftest/prefix.pl
create mode 100755 tools/testing/selftests/kselftest/prefix.py
--
2.43.0