Home
last modified time | relevance | path

Searched refs:stats_fd (Results 1 – 6 of 6) sorted by relevance

/linux-6.12.1/tools/testing/selftests/bpf/prog_tests/
Dprog_run_opts.c26 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()
Denable_stats.c8 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()
Dxdp_flowtable.c68 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-6.12.1/tools/testing/selftests/kvm/
Dkvm_binary_stats_test.c22 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-6.12.1/tools/testing/selftests/kvm/lib/
Dkvm_util.c755 if (vmp->stats_fd) { in kvm_vm_free()
757 close(vmp->stats_fd); in kvm_vm_free()
2145 struct kvm_stats_desc *read_stats_descriptors(int stats_fd, in read_stats_descriptors() argument
2157 ret = pread(stats_fd, stats_desc, total_size, header->desc_offset); in read_stats_descriptors()
2177 void read_stat_data(int stats_fd, struct kvm_stats_header *header, in read_stat_data() argument
2188 ret = pread(stats_fd, data, size, in read_stat_data()
2218 if (!vm->stats_fd) { in __vm_get_stat()
2219 vm->stats_fd = vm_get_stats_fd(vm); in __vm_get_stat()
2220 read_stats_header(vm->stats_fd, &vm->stats_header); in __vm_get_stat()
2221 vm->stats_desc = read_stats_descriptors(vm->stats_fd, in __vm_get_stat()
[all …]
/linux-6.12.1/tools/testing/selftests/kvm/include/
Dkvm_util.h103 int stats_fd; member
495 static inline void read_stats_header(int stats_fd, struct kvm_stats_header *header) in read_stats_header() argument
499 ret = pread(stats_fd, header, sizeof(*header), 0); in read_stats_header()
505 struct kvm_stats_desc *read_stats_descriptors(int stats_fd,
530 void read_stat_data(int stats_fd, struct kvm_stats_header *header,