aboutsummaryrefslogtreecommitdiffstats
path: root/tools/lib/perf/tests/test-threadmap.c
diff options
context:
space:
mode:
authorIan Rogers <irogers@google.com>2021-01-14 10:02:49 -0800
committerArnaldo Carvalho de Melo <acme@redhat.com>2021-01-15 17:28:27 -0300
commitbba2ea17ef553aea0df80cb64399fe2f70f225dd (patch)
tree00b4ddf6f9a931256eaac1e7d883c35029e5a647 /tools/lib/perf/tests/test-threadmap.c
parentlibperf tests: Avoid uninitialized variable warning (diff)
downloadlinux-dev-bba2ea17ef553aea0df80cb64399fe2f70f225dd.tar.xz
linux-dev-bba2ea17ef553aea0df80cb64399fe2f70f225dd.zip
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 '')
-rw-r--r--tools/lib/perf/tests/test-threadmap.c2
1 files changed, 1 insertions, 1 deletions
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;
}