diff options
Diffstat (limited to 'tools/perf/lib/tests/test-evsel.c')
-rw-r--r-- | tools/perf/lib/tests/test-evsel.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/tools/perf/lib/tests/test-evsel.c b/tools/perf/lib/tests/test-evsel.c index 2c648fe5617e..1b6c4285ac2b 100644 --- a/tools/perf/lib/tests/test-evsel.c +++ b/tools/perf/lib/tests/test-evsel.c @@ -1,10 +1,18 @@ // SPDX-License-Identifier: GPL-2.0 +#include <stdarg.h> +#include <stdio.h> #include <linux/perf_event.h> #include <perf/cpumap.h> #include <perf/threadmap.h> #include <perf/evsel.h> #include <internal/tests.h> +static int libperf_print(enum libperf_print_level level, + const char *fmt, va_list ap) +{ + return vfprintf(stderr, fmt, ap); +} + static int test_stat_cpu(void) { struct perf_cpu_map *cpus; @@ -116,6 +124,8 @@ int main(int argc, char **argv) { __T_START; + libperf_init(libperf_print); + test_stat_cpu(); test_stat_thread(); test_stat_thread_enable(); |