aboutsummaryrefslogtreecommitdiffstats
path: root/tools/perf/scripts/python/netdev-times.py
diff options
context:
space:
mode:
authorAthira Rajeev <[email protected]>2024-06-23 06:48:50 +0000
committerNamhyung Kim <[email protected]>2024-06-25 18:06:19 +0000
commit7d49ced808b169c8cb754da15a69ed0b2fb26567 (patch)
tree70258d4472b5104587b9191fd2f923d1d4c1239d /tools/perf/scripts/python/netdev-times.py
parenttools/perf: Use is_perf_pid_map_name helper function to check dso's of patter... (diff)
downloadkernel-7d49ced808b169c8cb754da15a69ed0b2fb26567.tar.gz
kernel-7d49ced808b169c8cb754da15a69ed0b2fb26567.zip
tools/perf: Fix parallel-perf python script to replace new python syntax ":=" usage
perf test "perf script tests" fails as below in systems with python 3.6 File "/home/athira/linux/tools/perf/tests/shell/../../scripts/python/parallel-perf.py", line 442 if line := p.stdout.readline(): ^ SyntaxError: invalid syntax --- Cleaning up --- ---- end(-1) ---- 92: perf script tests: FAILED! This happens because ":=" is a new syntax that assigns values to variables as part of a larger expression. This is introduced from python 3.8 and hence fails in setup with python 3.6 Address this by splitting the large expression and check the value in two steps: Previous line: if line := p.stdout.readline(): Current change: line = p.stdout.readline() if line: With patch ./perf test "perf script tests" 93: perf script tests: Ok Signed-off-by: Athira Rajeev <[email protected]> Acked-by: Adrian Hunter <[email protected]> Cc: [email protected] Cc: [email protected] Cc: [email protected] Cc: [email protected] Cc: [email protected] Signed-off-by: Namhyung Kim <[email protected]> Link: https://lore.kernel.org/r/[email protected]
Diffstat (limited to 'tools/perf/scripts/python/netdev-times.py')
0 files changed, 0 insertions, 0 deletions