lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <cd39e02e-f1b0-e6df-df30-953847af7783@linux.intel.com>
Date:   Wed, 13 Jul 2022 09:03:06 -0400
From:   "Liang, Kan" <kan.liang@...ux.intel.com>
To:     Adrian Hunter <adrian.hunter@...el.com>,
        Arnaldo Carvalho de Melo <acme@...nel.org>
Cc:     Jiri Olsa <jolsa@...hat.com>,
        Thomas Richter <tmricht@...ux.ibm.com>,
        Namhyung Kim <namhyung@...nel.org>,
        Ian Rogers <irogers@...gle.com>, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 1/2] perf tests: Stop Convert perf time to TSC test
 opening events twice



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@...el.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@...ux.intel.com>

Thanks,
Kan

>  		goto out_err;
>  	}
> -	CHECK__(evlist__open(evlist));
>  
>  	CHECK__(evlist__mmap(evlist, UINT_MAX));
>  

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ