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>

authored by Ian Rogers and committed by Arnaldo Carvalho de Melo bba2ea17 be82fddc

+4 -4
+1 -1
tools/lib/perf/tests/test-cpumap.c
··· 27 27 perf_cpu_map__put(cpus); 28 28 29 29 __T_END; 30 - return 0; 30 + return tests_failed == 0 ? 0 : -1; 31 31 }
+1 -1
tools/lib/perf/tests/test-evlist.c
··· 409 409 test_mmap_cpus(); 410 410 411 411 __T_END; 412 - return 0; 412 + return tests_failed == 0 ? 0 : -1; 413 413 }
+1 -1
tools/lib/perf/tests/test-evsel.c
··· 131 131 test_stat_thread_enable(); 132 132 133 133 __T_END; 134 - return 0; 134 + return tests_failed == 0 ? 0 : -1; 135 135 }
+1 -1
tools/lib/perf/tests/test-threadmap.c
··· 27 27 perf_thread_map__put(threads); 28 28 29 29 __T_END; 30 - return 0; 30 + return tests_failed == 0 ? 0 : -1; 31 31 }