mirror of
https://github.com/torvalds/linux.git
synced 2024-09-21 15:33:19 +00:00
perf tests: Stop Convert perf time to TSC test opening events twice
Do not call evlist__open() twice.
Fixes: 5bb017d4b9
("perf test: Fix error message for test case 71 on s390, where it is not supported")
Reviewed-by: Kan Liang <kan.liang@linux.intel.com>
Signed-off-by: Adrian Hunter <adrian.hunter@intel.com>
Cc: Ian Rogers <irogers@google.com>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Thomas Richter <tmricht@linux.ibm.com>
Link: https://lore.kernel.org/r/20220713123459.24145-2-adrian.hunter@intel.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
This commit is contained in:
parent
91d248c3b9
commit
498c7a54f1
|
@ -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));
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user