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] [day] [month] [year] [list]
Message-ID: <20210115185920.GD457607@kernel.org>
Date:   Fri, 15 Jan 2021 15:59:20 -0300
From:   Arnaldo Carvalho de Melo <acme@...nel.org>
To:     Ian Rogers <irogers@...gle.com>
Cc:     Peter Zijlstra <peterz@...radead.org>,
        Ingo Molnar <mingo@...hat.com>,
        Mark Rutland <mark.rutland@....com>,
        Alexander Shishkin <alexander.shishkin@...ux.intel.com>,
        Jiri Olsa <jolsa@...hat.com>,
        Namhyung Kim <namhyung@...nel.org>,
        linux-kernel@...r.kernel.org, Stephane Eranian <eranian@...gle.com>
Subject: Re: [PATCH 1/2] libperf tests: If a test fails return non-zero

Em Thu, Jan 14, 2021 at 10:02:49AM -0800, Ian Rogers escreveu:
> If a test fails return -1 rather than 0. This is consistent with the
> return value in test-cpumap.c

Thanks, applied both patches.

- Arnaldo

 
> Signed-off-by: Ian Rogers <irogers@...gle.com>
> ---
>  tools/lib/perf/tests/test-cpumap.c    | 2 +-
>  tools/lib/perf/tests/test-evlist.c    | 2 +-
>  tools/lib/perf/tests/test-evsel.c     | 2 +-
>  tools/lib/perf/tests/test-threadmap.c | 2 +-
>  4 files changed, 4 insertions(+), 4 deletions(-)
> 
> diff --git a/tools/lib/perf/tests/test-cpumap.c b/tools/lib/perf/tests/test-cpumap.c
> index c8d45091e7c2..c70e9e03af3e 100644
> --- a/tools/lib/perf/tests/test-cpumap.c
> +++ b/tools/lib/perf/tests/test-cpumap.c
> @@ -27,5 +27,5 @@ int main(int argc, char **argv)
>  	perf_cpu_map__put(cpus);
>  
>  	__T_END;
> -	return 0;
> +	return tests_failed == 0 ? 0 : -1;
>  }
> diff --git a/tools/lib/perf/tests/test-evlist.c b/tools/lib/perf/tests/test-evlist.c
> index 6d8ebe0c2504..d913241d4135 100644
> --- a/tools/lib/perf/tests/test-evlist.c
> +++ b/tools/lib/perf/tests/test-evlist.c
> @@ -409,5 +409,5 @@ int main(int argc, char **argv)
>  	test_mmap_cpus();
>  
>  	__T_END;
> -	return 0;
> +	return tests_failed == 0 ? 0 : -1;
>  }
> diff --git a/tools/lib/perf/tests/test-evsel.c b/tools/lib/perf/tests/test-evsel.c
> index 135722ac965b..0ad82d7a2a51 100644
> --- a/tools/lib/perf/tests/test-evsel.c
> +++ b/tools/lib/perf/tests/test-evsel.c
> @@ -131,5 +131,5 @@ int main(int argc, char **argv)
>  	test_stat_thread_enable();
>  
>  	__T_END;
> -	return 0;
> +	return tests_failed == 0 ? 0 : -1;
>  }
> diff --git a/tools/lib/perf/tests/test-threadmap.c b/tools/lib/perf/tests/test-threadmap.c
> index 7dc4d6fbedde..384471441b48 100644
> --- a/tools/lib/perf/tests/test-threadmap.c
> +++ b/tools/lib/perf/tests/test-threadmap.c
> @@ -27,5 +27,5 @@ int main(int argc, char **argv)
>  	perf_thread_map__put(threads);
>  
>  	__T_END;
> -	return 0;
> +	return tests_failed == 0 ? 0 : -1;
>  }
> -- 
> 2.30.0.284.gd98b1dd5eaa7-goog
> 

-- 

- Arnaldo

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ