aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAdrian Hunter <[email protected]>2022-07-13 15:34:58 +0300
committerArnaldo Carvalho de Melo <[email protected]>2022-07-17 10:56:58 -0300
commit498c7a54f169b2699104d3060604d840424f15d2 (patch)
tree6405953d7de957551ec350eb8c1d22599881c3ce
parent91d248c3b903b46a58cbc7e8d38d684d3e4007c2 (diff)
perf tests: Stop Convert perf time to TSC test opening events twice
Do not call evlist__open() twice. Fixes: 5bb017d4b97a0f13 ("perf test: Fix error message for test case 71 on s390, where it is not supported") Reviewed-by: Kan Liang <[email protected]> Signed-off-by: Adrian Hunter <[email protected]> Cc: Ian Rogers <[email protected]> Cc: Jiri Olsa <[email protected]> Cc: Namhyung Kim <[email protected]> Cc: Thomas Richter <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Arnaldo Carvalho de Melo <[email protected]>
-rw-r--r--tools/perf/tests/perf-time-to-tsc.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/tools/perf/tests/perf-time-to-tsc.c b/tools/perf/tests/perf-time-to-tsc.c
index 4ad0dfbc8b21..8d6d60173693 100644
--- a/tools/perf/tests/perf-time-to-tsc.c
+++ b/tools/perf/tests/perf-time-to-tsc.c
@@ -123,11 +123,14 @@ static int test__perf_time_to_tsc(struct test_suite *test __maybe_unused, int su
evsel->core.attr.enable_on_exec = 0;
}
- if (evlist__open(evlist) == -ENOENT) {
- err = TEST_SKIP;
+ ret = evlist__open(evlist);
+ if (ret < 0) {
+ if (ret == -ENOENT)
+ err = TEST_SKIP;
+ else
+ pr_debug("evlist__open() failed\n");
goto out_err;
}
- CHECK__(evlist__open(evlist));
CHECK__(evlist__mmap(evlist, UINT_MAX));