Skip to content

Commit 66dd86b

Browse files
captain5050acmel
authored andcommitted
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 <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>
1 parent bba2ea1 commit 66dd86b

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

tools/lib/perf/tests/test-evlist.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -214,6 +214,7 @@ static int test_mmap_thread(void)
214214
sysfs__mountpoint());
215215

216216
if (filename__read_int(path, &id)) {
217+
tests_failed++;
217218
fprintf(stderr, "error: failed to get tracepoint id: %s\n", path);
218219
return -1;
219220
}

0 commit comments

Comments
 (0)