Skip to content

Commit

Permalink
libperf tests: Fail when failing to get a tracepoint id
Browse files Browse the repository at this point in the history
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]>
  • Loading branch information
captain5050 authored and acmel committed Jan 15, 2021
1 parent bba2ea1 commit 66dd86b
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions tools/lib/perf/tests/test-evlist.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit 66dd86b

Please sign in to comment.