Home
last modified time | relevance | path

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

/linux/tools/testing/selftests/bpf/prog_tests/
H A Dunpriv_bpf_disabled.c61 char **map_paths, int *map_fds) in test_unpriv_bpf_disabled_positive() argument
96 map_fds[i] = bpf_obj_get(map_paths[i]); in test_unpriv_bpf_disabled_positive()
97 if (!ASSERT_GT(map_fds[i], -1, "obj_get")) in test_unpriv_bpf_disabled_positive()
122 ASSERT_OK(bpf_map_update_elem(map_fds[i], &key, vals, 0), "map_update_elem"); in test_unpriv_bpf_disabled_positive()
123 ASSERT_OK(bpf_map_lookup_elem(map_fds[i], &key, &lookup_vals), "map_lookup_elem"); in test_unpriv_bpf_disabled_positive()
126 ASSERT_OK(bpf_map_delete_elem(map_fds[i], &key), "map_delete_elem"); in test_unpriv_bpf_disabled_positive()
144 char **map_paths, int *map_fds) in test_unpriv_bpf_disabled_negative() argument
187 if (ASSERT_OK(bpf_map_get_info_by_fd(map_fds[0], &map_info, &map_info_len), in test_unpriv_bpf_disabled_negative()
230 int map_fds[NUM_MAPS]; in test_unpriv_bpf_disabled() local
247 map_fds[0] = bpf_map__fd(skel->maps.array); in test_unpriv_bpf_disabled()
[all …]
H A Dbpf_obj_id.c18 int prog_fds[nr_iters], map_fds[nr_iters]; in serial_test_bpf_obj_id() local
60 map_fds[i] = bpf_find_map(__func__, objs[i], "test_map_id"); in serial_test_bpf_obj_id()
61 if (!ASSERT_GE(map_fds[i], 0, "bpf_find_map")) in serial_test_bpf_obj_id()
64 err = bpf_map_update_elem(map_fds[i], &array_key, in serial_test_bpf_obj_id()
83 err = bpf_map_get_info_by_fd(map_fds[i], &map_infos[i], in serial_test_bpf_obj_id()
/linux/tools/testing/selftests/bpf/
H A Dtest_verifier.c1008 struct bpf_insn *prog, int *map_fds, int *fd_array) in fixup_prog_kfuncs()
1044 map_fds[0] = create_map(BPF_MAP_TYPE_HASH, sizeof(long long), in do_test_fixup()
1047 prog[*fixup_map_hash_8b].imm = map_fds[0]; in do_test_fixup()
1053 map_fds[1] = create_map(BPF_MAP_TYPE_HASH, sizeof(long long), in do_test_fixup()
1056 prog[*fixup_map_hash_48b].imm = map_fds[1]; in do_test_fixup()
1062 map_fds[2] = create_map(BPF_MAP_TYPE_HASH, sizeof(long long), in do_test_fixup()
1065 prog[*fixup_map_hash_16b].imm = map_fds[2]; in do_test_fixup()
1071 map_fds[3] = create_map(BPF_MAP_TYPE_ARRAY, sizeof(int), in do_test_fixup()
1073 update_map(map_fds[3], 0); in do_test_fixup()
1075 prog[*fixup_map_array_48b].imm = map_fds[ in do_test_fixup()
1012 do_test_fixup(struct bpf_test * test,enum bpf_prog_type prog_type,struct bpf_insn * prog,int * map_fds,int * fd_array) do_test_fixup() argument
1516 int map_fds[MAX_NR_MAPS]; do_test_single() local
[all...]