mirror of
https://github.com/torvalds/linux.git
synced 2026-04-26 02:22:28 -04:00
perf test: Run parallel tests in two passes
In pass 1 run all tests that succeed when run in parallel. In pass 2 sequentially run all remaining tests that are flagged as "exclusive". Sequential and dont_fork tests keep to run in pass 1. Read the exclusive flag from the shell test descriptions, but remove from display to avoid >100 characters. Add error handling to finish tests if starting a later test fails. Mark the task-exit test as exclusive due to issues reported-by James Clark. Tested-by: James Clark <james.clark@linaro.org> Signed-off-by: Ian Rogers <irogers@google.com> Cc: Colin Ian King <colin.i.king@gmail.com> Cc: Howard Chu <howardchu95@gmail.com> Cc: Weilin Wang <weilin.wang@intel.com> Cc: Ilya Leoshkevich <iii@linux.ibm.com> Cc: Thomas Richter <tmricht@linux.ibm.com> Cc: Andi Kleen <ak@linux.intel.com> Cc: Dapeng Mi <dapeng1.mi@linux.intel.com> Cc: Athira Jajeev <atrajeev@linux.vnet.ibm.com> Cc: Michael Petlan <mpetlan@redhat.com> Cc: Veronika Molnarova <vmolnaro@redhat.com> Link: https://lore.kernel.org/r/20241025192109.132482-8-irogers@google.com Signed-off-by: Namhyung Kim <namhyung@kernel.org>
This commit is contained in:
@@ -175,6 +175,7 @@ static void append_script(int dir_fd, const char *name, char *desc,
|
||||
struct test_suite *test_suite, **result_tmp;
|
||||
struct test_case *tests;
|
||||
size_t len;
|
||||
char *exclusive;
|
||||
|
||||
snprintf(link, sizeof(link), "/proc/%d/fd/%d", getpid(), dir_fd);
|
||||
len = readlink(link, filename, sizeof(filename));
|
||||
@@ -191,9 +192,13 @@ static void append_script(int dir_fd, const char *name, char *desc,
|
||||
return;
|
||||
}
|
||||
tests[0].name = strdup_check(name);
|
||||
exclusive = strstr(desc, " (exclusive)");
|
||||
if (exclusive != NULL) {
|
||||
tests[0].exclusive = true;
|
||||
exclusive[0] = '\0';
|
||||
}
|
||||
tests[0].desc = strdup_check(desc);
|
||||
tests[0].run_case = shell_test__run;
|
||||
|
||||
test_suite = zalloc(sizeof(*test_suite));
|
||||
if (!test_suite) {
|
||||
pr_err("Out of memory while building script test suite list\n");
|
||||
|
||||
Reference in New Issue
Block a user