aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIan Rogers <[email protected]>2021-01-14 10:02:50 -0800
committerArnaldo Carvalho de Melo <[email protected]>2021-01-15 17:28:27 -0300
commit66dd86b2a2bee129c70f7ff054d3a6a2e5f8eb20 (patch)
treed6ba9d8fc7fe3f01e9f3a34c5e425af82d39ef2d
parentbba2ea17ef553aea0df80cb64399fe2f70f225dd (diff)
libperf tests: Fail when failing to get a tracepoint id
Permissions are necessary to get a tracepoint id. Fail the test when the read fails. Signed-off-by: Ian Rogers <[email protected]> Acked-by: Jiri Olsa <[email protected]> Cc: Alexander Shishkin <[email protected]> Cc: Mark Rutland <[email protected]> Cc: Namhyung Kim <[email protected]> Cc: Peter Zijlstra <[email protected]> Cc: Stephane Eranian <[email protected]> Link: http://lore.kernel.org/lkml/[email protected] Signed-off-by: Arnaldo Carvalho de Melo <[email protected]>
-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 220a95be47c3..e2ac0b7f432e 100644
--- a/tools/lib/perf/tests/test-evlist.c
+++ b/tools/lib/perf/tests/test-evlist.c
@@ -214,6 +214,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;
}