Searched refs:stats_fd (Results 1 – 6 of 6) sorted by relevance
| /linux/tools/testing/selftests/bpf/prog_tests/ |
| H A D | prog_run_opts.c | 26 int err, stats_fd = -1, prog_fd; in test_prog_run_opts() local 38 stats_fd = bpf_enable_stats(BPF_STATS_RUN_TIME); in test_prog_run_opts() 39 if (!ASSERT_GE(stats_fd, 0, "enable_stats good fd")) in test_prog_run_opts() 75 if (stats_fd >= 0) in test_prog_run_opts() 76 close(stats_fd); in test_prog_run_opts()
|
| H A D | enable_stats.c | 8 int stats_fd, err, prog_fd; in test_enable_stats() local 17 stats_fd = bpf_enable_stats(BPF_STATS_RUN_TIME); in test_enable_stats() 18 if (CHECK(stats_fd < 0, "get_stats_fd", "failed %d\n", errno)) { in test_enable_stats() 44 close(stats_fd); in test_enable_stats()
|
| H A D | xdp_flowtable.c | 68 int iifindex, stats_fd; in test_xdp_flowtable() local 156 stats_fd = bpf_map__fd(skel->maps.stats); in test_xdp_flowtable() 157 if (!ASSERT_OK(bpf_map_lookup_elem(stats_fd, &key, &value), in test_xdp_flowtable()
|
| /linux/tools/testing/selftests/kvm/ |
| H A D | kvm_binary_stats_test.c | 22 static void stats_test(int stats_fd) in stats_test() argument 36 read_stats_header(stats_fd, &header); in stats_test() 44 ret = pread(stats_fd, id, header.name_size, sizeof(header)); in stats_test() 72 stats_desc = read_stats_descriptors(stats_fd, &header); in stats_test() 156 ret = pread(stats_fd, stats_data, size_data, header.data_offset); in stats_test() 161 read_stat_data(stats_fd, &header, pdesc, stats_data, in stats_test() 169 close(stats_fd); in stats_test() 170 TEST_ASSERT(fcntl(stats_fd, F_GETFD) == -1, "Stats fd not freed"); in stats_test()
|
| /linux/tools/testing/selftests/kvm/include/ |
| H A D | kvm_util.h | 554 static inline void read_stats_header(int stats_fd, struct kvm_stats_header *header) in read_stats_header() argument 558 ret = pread(stats_fd, header, sizeof(*header), 0); in read_stats_header() 564 struct kvm_stats_desc *read_stats_descriptors(int stats_fd, 589 void read_stat_data(int stats_fd, struct kvm_stats_header *header,
|
| /linux/tools/testing/selftests/kvm/lib/ |
| H A D | kvm_util.c | 2203 struct kvm_stats_desc *read_stats_descriptors(int stats_fd, in read_stats_descriptors() argument 2215 ret = pread(stats_fd, stats_desc, total_size, header->desc_offset); in read_stats_descriptors() 2235 void read_stat_data(int stats_fd, struct kvm_stats_header *header, in read_stat_data() argument 2246 ret = pread(stats_fd, data, size, in read_stat_data()
|