commit | bba2ea17ef553aea0df80cb64399fe2f70f225dd | [log] [tgz] |
---|---|---|
author | Ian Rogers <irogers@google.com> | Thu Jan 14 10:02:49 2021 -0800 |
committer | Arnaldo Carvalho de Melo <acme@redhat.com> | Fri Jan 15 17:28:27 2021 -0300 |
tree | 00b4ddf6f9a931256eaac1e7d883c35029e5a647 | |
parent | be82fddca81eefd1edbd9b290dfcb2177e24785b [diff] |
libperf tests: If a test fails return non-zero If a test fails return -1 rather than 0. This is consistent with the return value in test-cpumap.c Signed-off-by: Ian Rogers <irogers@google.com> Acked-by: Jiri Olsa <jolsa@redhat.com> Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com> Cc: Mark Rutland <mark.rutland@arm.com> Cc: Namhyung Kim <namhyung@kernel.org> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Stephane Eranian <eranian@google.com> Link: http://lore.kernel.org/lkml/20210114180250.3853825-1-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
diff --git a/tools/lib/perf/tests/test-cpumap.c b/tools/lib/perf/tests/test-cpumap.c index c8d4509..c70e9e0 100644 --- a/tools/lib/perf/tests/test-cpumap.c +++ b/tools/lib/perf/tests/test-cpumap.c
@@ -27,5 +27,5 @@ 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 1b225fe..220a95b 100644 --- a/tools/lib/perf/tests/test-evlist.c +++ b/tools/lib/perf/tests/test-evlist.c
@@ -409,5 +409,5 @@ 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 135722a..0ad82d7 100644 --- a/tools/lib/perf/tests/test-evsel.c +++ b/tools/lib/perf/tests/test-evsel.c
@@ -131,5 +131,5 @@ 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 7dc4d6f..3844714 100644 --- a/tools/lib/perf/tests/test-threadmap.c +++ b/tools/lib/perf/tests/test-threadmap.c
@@ -27,5 +27,5 @@ perf_thread_map__put(threads); __T_END; - return 0; + return tests_failed == 0 ? 0 : -1; }