aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorIan Rogers <irogers@google.com>2021-01-14 10:02:50 -0800
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2021-01-27 11:55:04 +0100
commit90ab323edfcdd054b33db0e63570a8eebb6d5559 (patch)
treefa90b6cbb67bb46123c4909c3c31f8f96054544d
parent680559480c95e356ec8d002ce19a5c758fea0817 (diff)
downloadkernel_replicant_linux-90ab323edfcdd054b33db0e63570a8eebb6d5559.tar.gz
kernel_replicant_linux-90ab323edfcdd054b33db0e63570a8eebb6d5559.tar.bz2
kernel_replicant_linux-90ab323edfcdd054b33db0e63570a8eebb6d5559.zip
libperf tests: Fail when failing to get a tracepoint id
[ Upstream commit 66dd86b2a2bee129c70f7ff054d3a6a2e5f8eb20 ] Permissions are necessary to get a tracepoint id. Fail the test when the read fails. 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-2-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com> Signed-off-by: Sasha Levin <sashal@kernel.org>
-rw-r--r--tools/lib/perf/tests/test-evlist.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/tools/lib/perf/tests/test-evlist.c b/tools/lib/perf/tests/test-evlist.c
index d913241d4135..bd19cabddaf6 100644
--- a/tools/lib/perf/tests/test-evlist.c
+++ b/tools/lib/perf/tests/test-evlist.c
@@ -215,6 +215,7 @@ static int test_mmap_thread(void)
sysfs__mountpoint());
if (filename__read_int(path, &id)) {
+ tests_failed++;
fprintf(stderr, "error: failed to get tracepoint id: %s\n", path);
return -1;
}