Skip to content

Commit db8fec5

Browse files
kim-phillips-armacmel
authored andcommitted
perf test shell: Prevent temporary editor files from being considered test scripts
Allows a perf shell test developer to concurrently edit and run their test scripts, avoiding perf test attempts to execute their editor temporary files, such as seen here: $ sudo taskset -c 0 ./perf test -vvvvvvvv -F 63 63: 0VIM 8.0 : --- start --- sh: 1: ./tests/shell/.record+probe_libc_inet_pton.sh.swp: Permission denied ---- end ---- 0VIM 8.0: FAILED! Signed-off-by: Kim Phillips <[email protected]> Cc: Alexander Shishkin <[email protected]> Cc: Hendrik Brueckner <[email protected]> Cc: Jiri Olsa <[email protected]> Cc: Michael Petlan <[email protected]> Cc: Namhyung Kim <[email protected]> Cc: Peter Zijlstra <[email protected]> Cc: Sandipan Das <[email protected]> Cc: Thomas Richter <[email protected]> Link: http://lkml.kernel.org/r/[email protected] Signed-off-by: Arnaldo Carvalho de Melo <[email protected]>
1 parent f6432b9 commit db8fec5

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

tools/perf/tests/builtin-test.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -422,7 +422,7 @@ static const char *shell_test__description(char *description, size_t size,
422422

423423
#define for_each_shell_test(dir, base, ent) \
424424
while ((ent = readdir(dir)) != NULL) \
425-
if (!is_directory(base, ent))
425+
if (!is_directory(base, ent) && ent->d_name[0] != '.')
426426

427427
static const char *shell_tests__dir(char *path, size_t size)
428428
{

0 commit comments

Comments
 (0)