Skip to contentSkip to conversation

perf tests switch-tracking: Set this test to run exclusively

PATCH Superseded Arnaldo Carvalho de Melo 2 participants 3 messages Dec 13, 2024 perf events

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore

Arnaldo Carvalho de Melo

author maintainer
#0 lore raw

PATCH 1/1 perf tests switch-tracking: Set this test to run exclusively

This test was failing when run with the default 'perf test' mode, which is to run multiple regression tests in parallel.

Since it checks system_wide mode, set it to run in exclusive mode.

Cc Adrian Hunter <[email protected]>
Cc Ian Rogers <[email protected]>
Cc James Clark <[email protected]>
Cc Jiri Olsa <[email protected]>
Cc Kan Liang <[email protected]>
Cc Namhyung Kim <[email protected]>
---
 tools/perf/tests/switch-tracking.c | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)
tools/perf/tests/switch-tracking.c +8 -1
index 5cab17a1942e67d7..88a03bcbecb2b11f 100644
@@ -583,4 +583,11 @@ static int test__switch_tracking(struct test_suite *test __maybe_unused, int sub
 	goto out;
 }
 
-DEFINE_SUITE("Track with sched_switch", switch_tracking);
+struct test_case tests__switch_tracking[] = {
+        TEST_CASE_EXCLUSIVE("Track with sched_switch", switch_tracking),
+        {       .name = NULL, }
+};
+struct test_suite suite__switch_tracking = {
+        .desc = "Track with sched_switch",
+        .test_cases = tests__switch_tracking,
+};
Signature · 1 line
2.47.0
reviewer
#1 lore raw
Quoted 24 lines · Arnaldo Carvalho de Melo

This test was failing when run with the default 'perf test' mode, which is to run multiple regression tests in parallel.

Since it checks system_wide mode, set it to run in exclusive mode.

Cc Adrian Hunter <[email protected]>
Cc Ian Rogers <[email protected]>
Cc James Clark <[email protected]>
Cc Jiri Olsa <[email protected]>
Cc Kan Liang <[email protected]>
Cc Namhyung Kim <[email protected]>
---
 tools/perf/tests/switch-tracking.c | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)
tools/perf/tests/switch-tracking.c +0 -0
index 5cab17a1942e67d7..88a03bcbecb2b11f 100644
@@ -583,4 +583,11 @@ static int test__switch_tracking(struct test_suite *test __maybe_unused, int sub
        goto out;
 }

tools/perf/tests/switch-tracking.c static int test__switch_tracking(struct test_suite *test __maybe_unused, int sub · line 593

Quoted 10 lines
tools/perf/tests/switch-tracking.c +8 -1
 
-DEFINE_SUITE("Track with sched_switch", switch_tracking);
+struct test_case tests__switch_tracking[] = {
+        TEST_CASE_EXCLUSIVE("Track with sched_switch", switch_tracking),
+        {       .name = NULL, }
+};
+struct test_suite suite__switch_tracking = {
+        .desc = "Track with sched_switch",
+        .test_cases = tests__switch_tracking,
+};

With Ravi's change:
https://lore.kernel.org/lkml/[email protected]/
This could be s/DEFINE_SUITE/DEFINE_SUITE_EXCLUSIVE/ , wdyt?

Thanks,
Ian

author maintainer
#2 lore raw
Quoted 27 lines · Ian Rogers
Quoted 25 lines · Arnaldo Carvalho de Melo

This test was failing when run with the default 'perf test' mode, which is to run multiple regression tests in parallel.

Since it checks system_wide mode, set it to run in exclusive mode.

Cc Adrian Hunter <[email protected]>
Cc Ian Rogers <[email protected]>
Cc James Clark <[email protected]>
Cc Jiri Olsa <[email protected]>
Cc Kan Liang <[email protected]>
Cc Namhyung Kim <[email protected]>
---
 tools/perf/tests/switch-tracking.c | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)
tools/perf/tests/switch-tracking.c +0 -0
index 5cab17a1942e67d7..88a03bcbecb2b11f 100644
@@ -583,4 +583,11 @@ static int test__switch_tracking(struct test_suite *test __maybe_unused, int sub
        goto out;
 }
 
Quoted 13 lines

tools/perf/tests/switch-tracking.c static int test__switch_tracking(struct test_suite *test __maybe_unused, int sub · line 593

Quoted 9 lines
tools/perf/tests/switch-tracking.c +8 -1
-DEFINE_SUITE("Track with sched_switch", switch_tracking);
+struct test_case tests__switch_tracking[] = {
+        TEST_CASE_EXCLUSIVE("Track with sched_switch", switch_tracking),
+        {       .name = NULL, }
+};
+struct test_suite suite__switch_tracking = {
+        .desc = "Track with sched_switch",
+        .test_cases = tests__switch_tracking,
+};

With Ravi's change:
https://lore.kernel.org/lkml/[email protected]/
This could be s/DEFINE_SUITE/DEFINE_SUITE_EXCLUSIVE/ , wdyt?

Sure, I saw that, forgot about it, then when looking for DEFINE_SUITE_EXCLUSIVE and not finding it, I just copy'n'pasted from what was in some other test.

I'll backtrack, add Ravi's patch, then resubmit.

Thanks!

- Arnaldo