aboutsummaryrefslogtreecommitdiff
path: root/tools/perf/scripts/python/libxed.py
diff options
context:
space:
mode:
authorIan Rogers <[email protected]>2022-05-17 13:41:44 -0700
committerArnaldo Carvalho de Melo <[email protected]>2022-05-21 14:45:19 -0300
commitcaaaa55477e23cec9761f7c981b144dd5ecc0bf3 (patch)
tree5fa9050093f430ae3d4045d4666ecfa74e5d8c3f /tools/perf/scripts/python/libxed.py
parent01b28e4a58152e8906eeb5f1b55a0c404c48c7c8 (diff)
perf test: Avoid shell test description infinite loop
for_each_shell_test() is already strict in expecting tests to be files and executable. It is sometimes possible when it iterates over all files that it finds one that is executable and lacks a newline character. When this happens the loop never terminates as it doesn't check for EOF. Add the EOF check to make this loop at least bounded by the file size. If the description is returned as NULL then also skip the test. Signed-off-by: Ian Rogers <[email protected]> Cc: Adrian Hunter <[email protected]> Cc: Alexander Shishkin <[email protected]> Cc: Ingo Molnar <[email protected]> Cc: Jiri Olsa <[email protected]> Cc: Marco Elver <[email protected]> Cc: Mark Rutland <[email protected]> Cc: Namhyung Kim <[email protected]> Cc: Peter Zijlstra <[email protected]> Cc: Riccardo Mancini <[email protected]> Cc: Sohaib Mohamed <[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/scripts/python/libxed.py')
0 files changed, 0 insertions, 0 deletions