Commit 5a02447c authored by Michael Petlan's avatar Michael Petlan Committed by Arnaldo Carvalho de Melo

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 7391db64 ("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: default avatarMichael Petlan <mpetlan@redhat.com>
Cc: Athira Rajeev <atrajeev@linux.vnet.ibm.com>
Cc: Ian Rogers <irogers@google.com>
Cc: Masami Hiramatsu <mhiramat@kernel.org>
Cc: Namhyung Kim <namhyung@kernel.org>
Link: https://lore.kernel.org/r/20240702110849.31904-3-vmolnaro@redhat.comSigned-off-by: default avatarVeronika Molnarova <vmolnaro@redhat.com>
Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
parent a68080e1
......@@ -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);
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment