Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

at v5.16-rc6 32 lines 580 B view raw
1// SPDX-License-Identifier: GPL-2.0 2#include <stdarg.h> 3#include <stdio.h> 4#include <perf/cpumap.h> 5#include <internal/tests.h> 6#include "tests.h" 7 8static int libperf_print(enum libperf_print_level level, 9 const char *fmt, va_list ap) 10{ 11 return vfprintf(stderr, fmt, ap); 12} 13 14int test_cpumap(int argc, char **argv) 15{ 16 struct perf_cpu_map *cpus; 17 18 __T_START; 19 20 libperf_init(libperf_print); 21 22 cpus = perf_cpu_map__dummy_new(); 23 if (!cpus) 24 return -1; 25 26 perf_cpu_map__get(cpus); 27 perf_cpu_map__put(cpus); 28 perf_cpu_map__put(cpus); 29 30 __T_END; 31 return tests_failed == 0 ? 0 : -1; 32}