perf test: Shell - Limit to only run executable scripts in tests
authorCarsten Haitzler <carsten.haitzler@arm.com>
Wed, 9 Mar 2022 12:28:57 +0000 (12:28 +0000)
committerArnaldo Carvalho de Melo <acme@redhat.com>
Mon, 11 Apr 2022 19:39:49 +0000 (16:39 -0300)
commit41204da4c16071be9090940b18f566832d46becc
tree1c1f11fb7407d1ae787fce605da1e38660aea19f
parentae24e9b53d5ead0c8cc758c0b32e716f0ba91138
perf test: Shell - Limit to only run executable scripts in tests

'perf test''s shell runner will just run everything in the tests
directory (as long as it's not another directory or does not begin
with a dot), but sometimes you find files in there that are not shell
scripts - perf.data output for example if you do some testing and then
the next time you run perf test it tries to run these.

Check the files are executable so they are actually intended to be test
scripts and not just some "random junk" files there.

Signed-off-by: Carsten Haitzler <carsten.haitzler@arm.com>
Reviewed-by: Leo Yan <leo.yan@linaro.org>
Cc: Mathieu Poirier <mathieu.poirier@linaro.org>
Cc: Mike Leach <mike.leach@linaro.org>
Cc: Suzuki Poulouse <suzuki.poulose@arm.com>
Cc: coresight@lists.linaro.org
Link: http://lore.kernel.org/lkml/20220309122859.31487-1-carsten.haitzler@foss.arm.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
tools/perf/tests/builtin-test.c
tools/perf/util/path.c
tools/perf/util/path.h