Home
last modified time | relevance | path

Searched refs:mfd (Results 1 – 3 of 3) sorted by relevance

/tools/testing/selftests/memfd/
Dfuse_test.c231 int fd, mfd, r; in main() local
269 mfd = mfd_assert_new("kern_memfd_fuse", in main()
274 p = mfd_assert_mmap_shared(mfd); in main()
278 global_mfd = mfd; in main()
298 was_sealed = mfd_assert_get_seals(mfd) & F_SEAL_WRITE; in main()
303 mfd_assert_has_seals(mfd, F_SEAL_WRITE); in main()
315 p = mfd_assert_mmap_private(mfd); in main()
324 close(mfd); in main()
/tools/testing/selftests/bpf/
Dtest_verifier.c422 static int create_prog_dummy2(enum bpf_prog_type prog_type, int mfd, int idx) in create_prog_dummy2() argument
426 BPF_LD_MAP_FD(BPF_REG_2, mfd), in create_prog_dummy2()
441 int mfd, p1fd, p2fd; in create_prog_array() local
443 mfd = bpf_create_map(BPF_MAP_TYPE_PROG_ARRAY, sizeof(int), in create_prog_array()
445 if (mfd < 0) { in create_prog_array()
453 p2fd = create_prog_dummy2(prog_type, mfd, p2key); in create_prog_array()
456 if (bpf_map_update_elem(mfd, &p1key, &p1fd, BPF_ANY) < 0) in create_prog_array()
458 if (bpf_map_update_elem(mfd, &p2key, &p2fd, BPF_ANY) < 0) in create_prog_array()
463 return mfd; in create_prog_array()
467 close(mfd); in create_prog_array()
Dtest_lru_map.c64 int mfd, pfd, ret, zero = 0; in bpf_map_lookup_elem_with_ref_bit() local
73 mfd = bpf_create_map_xattr(&map); in bpf_map_lookup_elem_with_ref_bit()
74 if (mfd < 0) in bpf_map_lookup_elem_with_ref_bit()
77 insns[0].imm = mfd; in bpf_map_lookup_elem_with_ref_bit()
87 close(mfd); in bpf_map_lookup_elem_with_ref_bit()
96 assert(!bpf_map_lookup_elem(mfd, &zero, value)); in bpf_map_lookup_elem_with_ref_bit()
100 close(mfd); in bpf_map_lookup_elem_with_ref_bit()