mirror of
https://github.com/torvalds/linux.git
synced 2024-11-27 06:31:52 +00:00
perf test: Make parallel testing the default
Now C tests can have the "exclusive" flag to run without other tests, and shell tests can add "(exclusive)" to their description, run tests in parallel by default. Tests which flake when run in parallel can be marked exclusive to resolve the problem. Non-scientifically, the reduction on `perf test` execution time is from 8m35.890s to 3m55.115s on a Tigerlake laptop. So the tests complete in less than half the time. 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-9-irogers@google.com Signed-off-by: Namhyung Kim <namhyung@kernel.org>
This commit is contained in:
parent
79e72f384d
commit
94d1a913bd
@ -40,8 +40,8 @@
|
||||
* making them easier to debug.
|
||||
*/
|
||||
static bool dont_fork;
|
||||
/* Don't fork the tests in parallel and wait for their completion. */
|
||||
static bool sequential = true;
|
||||
/* Fork the tests in parallel and wait for their completion. */
|
||||
static bool sequential;
|
||||
const char *dso_to_test;
|
||||
const char *test_objdump_path = "objdump";
|
||||
|
||||
@ -639,19 +639,12 @@ int cmd_test(int argc, const char **argv)
|
||||
const char *skip = NULL;
|
||||
const char *workload = NULL;
|
||||
bool list_workloads = false;
|
||||
/*
|
||||
* Run tests in parallel, lacks infrastructure to avoid running tests
|
||||
* that clash for resources, So leave it as the developers choice to
|
||||
* enable while working on the needed infra.
|
||||
*/
|
||||
bool parallel = false;
|
||||
const struct option test_options[] = {
|
||||
OPT_STRING('s', "skip", &skip, "tests", "tests to skip"),
|
||||
OPT_INCR('v', "verbose", &verbose,
|
||||
"be more verbose (show symbol address, etc)"),
|
||||
OPT_BOOLEAN('F', "dont-fork", &dont_fork,
|
||||
"Do not fork for testcase"),
|
||||
OPT_BOOLEAN('p', "parallel", ¶llel, "Run the tests in parallel"),
|
||||
OPT_BOOLEAN('S', "sequential", &sequential,
|
||||
"Run the tests one after another rather than in parallel"),
|
||||
OPT_STRING('w', "workload", &workload, "work", "workload to run for testing, use '--list-workloads' to list the available ones."),
|
||||
@ -688,8 +681,6 @@ int cmd_test(int argc, const char **argv)
|
||||
|
||||
if (dont_fork)
|
||||
sequential = true;
|
||||
else if (parallel)
|
||||
sequential = false;
|
||||
|
||||
symbol_conf.priv_size = sizeof(int);
|
||||
symbol_conf.try_vmlinux_path = true;
|
||||
|
Loading…
Reference in New Issue
Block a user