[PATCH v1 3/8] perf test: Reduce scope of parallel variable

From: Ian Rogers
Date: Fri Oct 11 2024 - 03:37:13 EST


The variable duplicates sequential but is only used for command line
argument processing. Reduce scope to make the behavior clearer.

Signed-off-by: Ian Rogers <irogers@xxxxxxxxxx>
---
tools/perf/tests/builtin-test.c | 9 ++++++---
1 file changed, 6 insertions(+), 3 deletions(-)

diff --git a/tools/perf/tests/builtin-test.c b/tools/perf/tests/builtin-test.c
index df0466d3def6..6b8ef198d975 100644
--- a/tools/perf/tests/builtin-test.c
+++ b/tools/perf/tests/builtin-test.c
@@ -41,9 +41,6 @@
static bool dont_fork;
/* Don't fork the tests in parallel and wait for their completion. */
static bool sequential = true;
-/* Do it 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 */
-static bool parallel;
const char *dso_to_test;
const char *test_objdump_path = "objdump";

@@ -566,6 +563,12 @@ int cmd_test(int argc, const char **argv)
};
const char *skip = NULL;
const char *workload = NULL;
+ /*
+ * 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,
--
2.47.0.rc1.288.g06298d1525-goog