summaryrefslogtreecommitdiff
path: root/tools/lib/perf/tests/test-evsel.c
diff options
context:
space:
mode:
authorIan Rogers <irogers@google.com>2021-01-14 21:02:49 +0300
committerArnaldo Carvalho de Melo <acme@redhat.com>2021-01-15 23:28:27 +0300
commitbba2ea17ef553aea0df80cb64399fe2f70f225dd (patch)
tree00b4ddf6f9a931256eaac1e7d883c35029e5a647 /tools/lib/perf/tests/test-evsel.c
parentbe82fddca81eefd1edbd9b290dfcb2177e24785b (diff)
downloadlinux-bba2ea17ef553aea0df80cb64399fe2f70f225dd.tar.xz
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>
Diffstat (limited to 'tools/lib/perf/tests/test-evsel.c')
-rw-r--r--tools/lib/perf/tests/test-evsel.c2
1 files changed, 1 insertions, 1 deletions
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;
}