David Brazdil | 0f672f6 | 2019-12-10 10:32:29 +0000 | [diff] [blame] | 1 | // SPDX-License-Identifier: GPL-2.0 |
| 2 | #include <stdarg.h> |
| 3 | #include <stdio.h> |
| 4 | #include <perf/threadmap.h> |
| 5 | #include <internal/tests.h> |
| 6 | |
| 7 | static int libperf_print(enum libperf_print_level level, |
| 8 | const char *fmt, va_list ap) |
| 9 | { |
| 10 | return vfprintf(stderr, fmt, ap); |
| 11 | } |
| 12 | |
| 13 | int main(int argc, char **argv) |
| 14 | { |
| 15 | struct perf_thread_map *threads; |
| 16 | |
| 17 | __T_START; |
| 18 | |
| 19 | libperf_init(libperf_print); |
| 20 | |
| 21 | threads = perf_thread_map__new_dummy(); |
| 22 | if (!threads) |
| 23 | return -1; |
| 24 | |
| 25 | perf_thread_map__get(threads); |
| 26 | perf_thread_map__put(threads); |
| 27 | perf_thread_map__put(threads); |
| 28 | |
| 29 | __T_OK; |
| 30 | return 0; |
| 31 | } |