Skip to content
This repository was archived by the owner on Oct 3, 2024. It is now read-only.

Commit 498c7a5

Browse files
ahunter6acmel
authored andcommitted
perf tests: Stop Convert perf time to TSC test opening events twice
Do not call evlist__open() twice. Fixes: 5bb017d ("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]>
1 parent 91d248c commit 498c7a5

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

tools/perf/tests/perf-time-to-tsc.c

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -123,11 +123,14 @@ static int test__perf_time_to_tsc(struct test_suite *test __maybe_unused, int su
123123
evsel->core.attr.enable_on_exec = 0;
124124
}
125125

126-
if (evlist__open(evlist) == -ENOENT) {
127-
err = TEST_SKIP;
126+
ret = evlist__open(evlist);
127+
if (ret < 0) {
128+
if (ret == -ENOENT)
129+
err = TEST_SKIP;
130+
else
131+
pr_debug("evlist__open() failed\n");
128132
goto out_err;
129133
}
130-
CHECK__(evlist__open(evlist));
131134

132135
CHECK__(evlist__mmap(evlist, UINT_MAX));
133136

0 commit comments

Comments
 (0)