summaryrefslogtreecommitdiff
path: root/tools/perf/util/path.h
diff options
context:
space:
mode:
authorCarsten Haitzler <carsten.haitzler@arm.com>2022-03-09 15:28:57 +0300
committerArnaldo Carvalho de Melo <acme@redhat.com>2022-04-11 22:39:49 +0300
commit41204da4c16071be9090940b18f566832d46becc (patch)
tree1c1f11fb7407d1ae787fce605da1e38660aea19f /tools/perf/util/path.h
parentae24e9b53d5ead0c8cc758c0b32e716f0ba91138 (diff)
downloadlinux-41204da4c16071be9090940b18f566832d46becc.tar.xz
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>
Diffstat (limited to 'tools/perf/util/path.h')
-rw-r--r--tools/perf/util/path.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/tools/perf/util/path.h b/tools/perf/util/path.h
index 083429b7efa3..d94902c22222 100644
--- a/tools/perf/util/path.h
+++ b/tools/perf/util/path.h
@@ -12,5 +12,6 @@ int path__join3(char *bf, size_t size, const char *path1, const char *path2, con
bool is_regular_file(const char *file);
bool is_directory(const char *base_path, const struct dirent *dent);
+bool is_executable_file(const char *base_path, const struct dirent *dent);
#endif /* _PERF_PATH_H */