Skip to content

Commit 94d1a91

Browse files
captain5050namhyung
authored andcommitted
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 <[email protected]> Signed-off-by: Ian Rogers <[email protected]> Cc: Colin Ian King <[email protected]> Cc: Howard Chu <[email protected]> Cc: Weilin Wang <[email protected]> Cc: Ilya Leoshkevich <[email protected]> Cc: Thomas Richter <[email protected]> Cc: Andi Kleen <[email protected]> Cc: Dapeng Mi <[email protected]> Cc: Athira Jajeev <[email protected]> Cc: Michael Petlan <[email protected]> Cc: Veronika Molnarova <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Namhyung Kim <[email protected]>
1 parent 79e72f3 commit 94d1a91

File tree

1 file changed

+2
-11
lines changed

1 file changed

+2
-11
lines changed

tools/perf/tests/builtin-test.c

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,8 @@
4040
* making them easier to debug.
4141
*/
4242
static bool dont_fork;
43-
/* Don't fork the tests in parallel and wait for their completion. */
44-
static bool sequential = true;
43+
/* Fork the tests in parallel and wait for their completion. */
44+
static bool sequential;
4545
const char *dso_to_test;
4646
const char *test_objdump_path = "objdump";
4747

@@ -639,19 +639,12 @@ int cmd_test(int argc, const char **argv)
639639
const char *skip = NULL;
640640
const char *workload = NULL;
641641
bool list_workloads = false;
642-
/*
643-
* Run tests in parallel, lacks infrastructure to avoid running tests
644-
* that clash for resources, So leave it as the developers choice to
645-
* enable while working on the needed infra.
646-
*/
647-
bool parallel = false;
648642
const struct option test_options[] = {
649643
OPT_STRING('s', "skip", &skip, "tests", "tests to skip"),
650644
OPT_INCR('v', "verbose", &verbose,
651645
"be more verbose (show symbol address, etc)"),
652646
OPT_BOOLEAN('F', "dont-fork", &dont_fork,
653647
"Do not fork for testcase"),
654-
OPT_BOOLEAN('p', "parallel", &parallel, "Run the tests in parallel"),
655648
OPT_BOOLEAN('S', "sequential", &sequential,
656649
"Run the tests one after another rather than in parallel"),
657650
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)
688681

689682
if (dont_fork)
690683
sequential = true;
691-
else if (parallel)
692-
sequential = false;
693684

694685
symbol_conf.priv_size = sizeof(int);
695686
symbol_conf.try_vmlinux_path = true;

0 commit comments

Comments
 (0)