From: "Liang, Kan" <kan.liang@linux.intel.com>
To: Adrian Hunter <adrian.hunter@intel.com>,
Arnaldo Carvalho de Melo <acme@kernel.org>
Cc: Jiri Olsa <jolsa@redhat.com>,
Thomas Richter <tmricht@linux.ibm.com>,
Namhyung Kim <namhyung@kernel.org>,
Ian Rogers <irogers@google.com>,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH 1/2] perf tests: Stop Convert perf time to TSC test opening events twice
Date: Wed, 13 Jul 2022 09:03:06 -0400 [thread overview]
Message-ID: <cd39e02e-f1b0-e6df-df30-953847af7783@linux.intel.com> (raw)
In-Reply-To: <20220713123459.24145-2-adrian.hunter@intel.com>
On 2022-07-13 8:34 a.m., Adrian Hunter wrote:
> 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");
The error message for the evlist__open is slightly different with the
old one, "evlist__open(evlist) failed!". Not sure if anyone care about it.
Reviewed-by: Kan Liang <kan.liang@linux.intel.com>
Thanks,
Kan
> goto out_err;
> }
> - CHECK__(evlist__open(evlist));
>
> CHECK__(evlist__mmap(evlist, UINT_MAX));
>
next prev parent reply other threads:[~2022-07-13 13:03 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-07-13 12:34 [PATCH 0/2] perf tests: Fix Convert perf time to TSC test for hybrid Adrian Hunter
2022-07-13 12:34 ` [PATCH 1/2] perf tests: Stop Convert perf time to TSC test opening events twice Adrian Hunter
2022-07-13 13:03 ` Liang, Kan [this message]
2022-07-13 12:34 ` [PATCH 2/2] perf tests: Fix Convert perf time to TSC test for hybrid Adrian Hunter
2022-07-13 13:05 ` Liang, Kan
2022-07-17 13:58 ` Arnaldo Carvalho de Melo
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=cd39e02e-f1b0-e6df-df30-953847af7783@linux.intel.com \
--to=kan.liang@linux.intel.com \
--cc=acme@kernel.org \
--cc=adrian.hunter@intel.com \
--cc=irogers@google.com \
--cc=jolsa@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=namhyung@kernel.org \
--cc=tmricht@linux.ibm.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox