summaryrefslogtreecommitdiff
path: root/block
diff options
context:
space:
mode:
authorIan Rogers <irogers@google.com>2022-05-17 13:41:44 -0700
committerArnaldo Carvalho de Melo <acme@redhat.com>2022-05-21 14:45:19 -0300
commitcaaaa55477e23cec9761f7c981b144dd5ecc0bf3 (patch)
tree5fa9050093f430ae3d4045d4666ecfa74e5d8c3f /block
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 <irogers@google.com> Cc: Adrian Hunter <adrian.hunter@intel.com> Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com> Cc: Ingo Molnar <mingo@redhat.com> Cc: Jiri Olsa <jolsa@kernel.org> Cc: Marco Elver <elver@google.com> Cc: Mark Rutland <mark.rutland@arm.com> Cc: Namhyung Kim <namhyung@kernel.org> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Riccardo Mancini <rickyman7@gmail.com> Cc: Sohaib Mohamed <sohaib.amhmd@gmail.com> Cc: Stephane Eranian <eranian@google.com> Link: https://lore.kernel.org/r/20220517204144.645913-1-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'block')
0 files changed, 0 insertions, 0 deletions