Messages in this thread Patch in this message | | | From | Adrian Hunter <> | Subject | [PATCH 1/2] perf tests: Stop Convert perf time to TSC test opening events twice | Date | Wed, 13 Jul 2022 15:34:58 +0300 |
| |
Do not call evlist__open() twice.
Fixes: 5bb017d4b97a ("perf test: Fix error message for test case 71 on s390, where it is not supported") Signed-off-by: Adrian Hunter <adrian.hunter@intel.com> --- tools/perf/tests/perf-time-to-tsc.c | 9 ++++++--- 1 file 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)); -- 2.25.1
| |