aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Petlan <[email protected]>2024-07-02 11:08:40 +0000
committerArnaldo Carvalho de Melo <[email protected]>2024-08-28 21:07:20 +0000
commit5a02447c8145b87373ada2040bbab5bc2a8f87be (patch)
tree3ff74f50b72748a1acff7cef9a76e5058792bfac
parentperf test vfs_getname: Look for alternative line where to collect the pathname (diff)
downloadkernel-5a02447c8145b87373ada2040bbab5bc2a8f87be.tar.gz
kernel-5a02447c8145b87373ada2040bbab5bc2a8f87be.zip
perf tests shell: Skip base_* dirs in test script search
The test scripts in base_* directories currently have their own drivers that run them. Before this patch, the shell test-suite generator causes them to run twice. Fix that by skipping them in the generator. A cleaner solution (for future) will be to use the directory structure idea (introduced by Carsten Haitzler in 7391db645938 ("perf test: Refactor shell tests allowing subdirs")) to generate test entries with subtests, like: $ perf test list [...] 97: perf probe shell tests 97:1: perf probe basic functionality 97:2: perf probe tests with arguments 97:3: perf probe invalid options handling [...] There is already a lot of shell test scripts and many are about to come, so there is a need for some hierarchy. Signed-off-by: Michael Petlan <[email protected]> Cc: Athira Rajeev <[email protected]> Cc: Ian Rogers <[email protected]> Cc: Masami Hiramatsu <[email protected]> Cc: Namhyung Kim <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Veronika Molnarova <[email protected]> Signed-off-by: Arnaldo Carvalho de Melo <[email protected]>
-rw-r--r--tools/perf/tests/tests-scripts.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/tools/perf/tests/tests-scripts.c b/tools/perf/tests/tests-scripts.c
index 8dc1e398288c..ed114b044293 100644
--- a/tools/perf/tests/tests-scripts.c
+++ b/tools/perf/tests/tests-scripts.c
@@ -251,6 +251,8 @@ static void append_scripts_in_dir(int dir_fd,
if (!S_ISDIR(st.st_mode))
continue;
}
+ if (strncmp(ent->d_name, "base_", 5) == 0)
+ continue; /* Skip scripts that have a separate driver. */
fd = openat(dir_fd, ent->d_name, O_PATH);
append_scripts_in_dir(fd, result, result_sz);
}