/tools/testing/selftests/bpf/prog_tests/ |
D | fexit_bpf2bpf.c | 59 const char **prog_name, in test_fexit_bpf2bpf_common() argument 117 tgt_name = strstr(prog_name[i], "/"); in test_fexit_bpf2bpf_common() 125 if (pos_sec_name && !strcmp(pos_sec_name, prog_name[i])) { in test_fexit_bpf2bpf_common() 130 if (!ASSERT_OK_PTR(prog[i], prog_name[i])) in test_fexit_bpf2bpf_common() 176 const char *prog_name[] = { in test_target_no_callees() local 181 ARRAY_SIZE(prog_name), in test_target_no_callees() 182 prog_name, true, NULL); in test_target_no_callees() 187 const char *prog_name[] = { in test_target_yes_callees() local 195 ARRAY_SIZE(prog_name), in test_target_yes_callees() 196 prog_name, true, NULL); in test_target_yes_callees() [all …]
|
D | rdonly_maps.c | 12 const char *prog_name; member 50 prog = bpf_object__find_program_by_name(obj, t->prog_name); in test_rdonly_maps() 52 t->prog_name)) in test_rdonly_maps() 74 "prog '%s' didn't run?\n", t->prog_name)) in test_rdonly_maps() 78 t->prog_name, bss.iters, t->exp_iters)) in test_rdonly_maps() 82 t->prog_name, bss.sum, t->exp_sum)) in test_rdonly_maps()
|
D | tailcalls.c | 15 char prog_name[32]; in test_tailcall_1() local 45 snprintf(prog_name, sizeof(prog_name), "classifier_%d", i); in test_tailcall_1() 47 prog = bpf_object__find_program_by_name(obj, prog_name); in test_tailcall_1() 75 snprintf(prog_name, sizeof(prog_name), "classifier_%d", i); in test_tailcall_1() 77 prog = bpf_object__find_program_by_name(obj, prog_name); in test_tailcall_1() 96 snprintf(prog_name, sizeof(prog_name), "classifier_%d", j); in test_tailcall_1() 98 prog = bpf_object__find_program_by_name(obj, prog_name); in test_tailcall_1() 151 char prog_name[32]; in test_tailcall_2() local 181 snprintf(prog_name, sizeof(prog_name), "classifier_%d", i); in test_tailcall_2() 183 prog = bpf_object__find_program_by_name(obj, prog_name); in test_tailcall_2() [all …]
|
D | dynptr.c | 15 const char *prog_name; member 33 static void verify_success(const char *prog_name, enum test_setup_type setup_type) in verify_success() argument 46 prog = bpf_object__find_program_by_name(skel->obj, prog_name); in verify_success() 103 if (!test__start_subtest(success_tests[i].prog_name)) in test_dynptr() 106 verify_success(success_tests[i].prog_name, success_tests[i].type); in test_dynptr()
|
D | kfunc_dynptr_param.c | 14 const char *prog_name; member 64 static void verify_success(const char *prog_name, int expected_runtime_err) in verify_success() argument 83 prog = bpf_object__find_program_by_name(skel->obj, prog_name); in verify_success() 112 if (!test__start_subtest(kfunc_dynptr_tests[i].prog_name)) in test_kfunc_dynptr_param() 115 verify_success(kfunc_dynptr_tests[i].prog_name, in test_kfunc_dynptr_param()
|
D | spin_lock.c | 12 const char *prog_name; member 71 static void test_spin_lock_fail_prog(const char *prog_name, const char *err_msg) in test_spin_lock_fail_prog() argument 84 prog = bpf_object__find_program_by_name(skel->obj, prog_name); in test_spin_lock_fail_prog() 164 if (!test__start_subtest(spin_lock_fail_tests[i].prog_name)) in test_spin_lock() 166 test_spin_lock_fail_prog(spin_lock_fail_tests[i].prog_name, in test_spin_lock()
|
D | kfunc_call.c | 24 const char *prog_name; member 33 .prog_name = #name, \ 42 .prog_name = #name, \ 119 prog = bpf_object__find_program_by_name(skel->obj, param->prog_name); in verify_success() 125 if (!ASSERT_OK(err, param->prog_name)) in verify_success() 140 if (!ASSERT_OK(err, param->prog_name)) in verify_success() 184 prog = bpf_object__find_program_by_name(skel->obj, param->prog_name); in verify_fail() 203 if (!ASSERT_EQ(err, param->retval, param->prog_name)) in verify_fail() 222 if (!test__start_subtest(kfunc_tests[i].prog_name)) in test_main()
|
D | stacktrace_map_raw_tp.c | 6 const char *prog_name = "oncpu"; in test_stacktrace_map_raw_tp() local 19 prog = bpf_object__find_program_by_name(obj, prog_name); in test_stacktrace_map_raw_tp() 20 if (CHECK(!prog, "find_prog", "prog '%s' not found\n", prog_name)) in test_stacktrace_map_raw_tp()
|
D | stacktrace_map.c | 7 const char *prog_name = "oncpu"; in test_stacktrace_map() local 19 prog = bpf_object__find_program_by_name(obj, prog_name); in test_stacktrace_map() 20 if (CHECK(!prog, "find_prog", "prog '%s' not found\n", prog_name)) in test_stacktrace_map()
|
D | core_reloc.c | 32 .prog_name = pg_name, \ 49 .prog_name = "test_core_flavors" \ 74 .prog_name = "test_core_nesting" \ 102 .prog_name = "test_core_arrays" \ 136 .prog_name = "test_core_primitives" \ 172 .prog_name = "test_core_mods", \ 190 .prog_name = "test_core_ptr_as_arr", \ 209 .prog_name = "test_core_ints" 229 .prog_name = "test_core_existence" 245 .prog_name = "test_core_bitfields", \ [all …]
|
D | bpf_nf.c | 11 const char *prog_name; member 138 static void test_bpf_nf_ct_fail(const char *prog_name, const char *err_msg) in test_bpf_nf_ct_fail() argument 151 prog = bpf_object__find_program_by_name(skel->obj, prog_name); in test_bpf_nf_ct_fail() 178 if (test__start_subtest(test_bpf_nf_fail_tests[i].prog_name)) in test_bpf_nf() 179 test_bpf_nf_ct_fail(test_bpf_nf_fail_tests[i].prog_name, in test_bpf_nf()
|
D | obj_name.c | 30 ncopy = name_len < sizeof(attr.prog_name) ? in test_obj_name() 31 name_len : sizeof(attr.prog_name); in test_obj_name() 37 memcpy(attr.prog_name, tests[i].name, ncopy); in test_obj_name()
|
D | cb_refs.c | 11 const char *prog_name; member 38 prog = bpf_object__find_program_by_name(skel->obj, cb_refs_tests[i].prog_name); in test_cb_refs()
|
D | cpumask.c | 23 static void verify_success(const char *prog_name) in verify_success() argument 42 prog = bpf_object__find_program_by_name(skel->obj, prog_name); in verify_success()
|
D | task_kfunc.c | 34 static void run_success_test(const char *prog_name) in run_success_test() argument 49 prog = bpf_object__find_program_by_name(skel->obj, prog_name); in run_success_test()
|
D | get_stack_raw_tp.c | 89 const char *prog_name = "bpf_prog1"; in test_get_stack_raw_tp() local 107 prog = bpf_object__find_program_by_name(obj, prog_name); in test_get_stack_raw_tp() 108 if (CHECK(!prog, "find_probe", "prog '%s' not found\n", prog_name)) in test_get_stack_raw_tp()
|
D | cgrp_kfunc.c | 48 static void run_success_test(const char *prog_name) in run_success_test() argument 61 prog = bpf_object__find_program_by_name(skel->obj, prog_name); in run_success_test()
|
/tools/lib/bpf/ |
D | relo_core.c | 56 #define libbpf_print(level, fmt, ...) bpf_log((void *)prog_name, fmt, ##__VA_ARGS__) 263 int bpf_core_parse_spec(const char *prog_name, const struct btf *btf, in bpf_core_parse_spec() argument 387 prog_name, relo->type_id, spec_str, i, id, btf_kind_str(t)); in bpf_core_parse_spec() 678 static int bpf_core_calc_field_relo(const char *prog_name, in bpf_core_calc_field_relo() argument 722 prog_name, relo->kind, relo->insn_off / 8); in bpf_core_calc_field_relo() 744 prog_name, relo->kind, relo->insn_off / 8); in bpf_core_calc_field_relo() 879 static int bpf_core_calc_relo(const char *prog_name, in bpf_core_calc_relo() argument 897 err = bpf_core_calc_field_relo(prog_name, relo, local_spec, in bpf_core_calc_relo() 900 err = err ?: bpf_core_calc_field_relo(prog_name, relo, targ_spec, in bpf_core_calc_relo() 958 prog_name, relo_idx, core_relo_kind_str(relo->kind), in bpf_core_calc_relo() [all …]
|
D | relo_core.h | 82 int bpf_core_calc_relo_insn(const char *prog_name, 89 int bpf_core_patch_insn(const char *prog_name, struct bpf_insn *insn, 93 int bpf_core_parse_spec(const char *prog_name, const struct btf *btf,
|
/tools/testing/selftests/bpf/ |
D | test_cpp.cpp | 57 std::string prog_name; in try_skeleton_template() local 85 prog_name = bpf_program__name(skel->progs.handle_sys_enter); in try_skeleton_template() 86 if (prog_name != "handle_sys_enter") in try_skeleton_template() 87 fprintf(stderr, "Unexpected program name: %s\n", prog_name.c_str()); in try_skeleton_template()
|
D | veristat.c | 83 char *prog_name; member 91 char *prog_name; member 388 static bool should_process_file_prog(const char *filename, const char *prog_name) in should_process_file_prog() argument 400 if (f->any_glob && prog_name && glob_matches(prog_name, f->any_glob)) in should_process_file_prog() 404 if (f->prog_glob && prog_name && glob_matches(prog_name, f->prog_glob)) in should_process_file_prog() 423 if (!prog_name || glob_matches(prog_name, f->any_glob)) in should_process_file_prog() 428 if (f->prog_glob && prog_name && !glob_matches(prog_name, f->prog_glob)) in should_process_file_prog() 780 free(stats[i].prog_name); in free_verif_stats() 905 const char *prog_name = bpf_program__name(prog); in fixup_obj() local 915 id = btf__find_by_name_kind(btf, prog_name, BTF_KIND_FUNC); in fixup_obj() [all …]
|
D | flow_dissector_load.h | 11 const char *prog_name, in bpf_flow_load() argument 27 main_prog = bpf_object__find_program_by_name(*obj, prog_name); in bpf_flow_load()
|
D | test_loader.c | 58 const char *prog_name; member 173 spec->prog_name = bpf_program__name(prog); in parse_test_spec() 181 func_id = btf__find_by_name_kind(btf, spec->prog_name, BTF_KIND_FUNC); in parse_test_spec() 183 ASSERT_FAIL("failed to find FUNC BTF type for '%s'", spec->prog_name); in parse_test_spec() 281 description = spec->prog_name; in parse_test_spec() 574 if (strcmp(bpf_program__name(tprog_iter), spec->prog_name) == 0) { in run_subtest()
|
/tools/bpf/bpftool/ |
D | cgroup.c | 100 char prog_name[MAX_PROG_FULL_NAME]; in show_bpf_prog() local 131 get_prog_full_name(&info, prog_fd, prog_name, sizeof(prog_name)); in show_bpf_prog() 141 jsonw_string_field(json_wtr, "name", prog_name); in show_bpf_prog() 154 printf(" %-15s", prog_name); in show_bpf_prog() 156 printf(" %-15s %-15s", attach_flags_str, prog_name); in show_bpf_prog()
|
D | common.c | 411 const char *prog_name = prog_info->name; in get_prog_full_name() local 442 prog_name = btf__name_by_offset(prog_btf, func_type->name_off); in get_prog_full_name() 445 snprintf(name_buff, buff_len, "%s", prog_name); in get_prog_full_name() 808 char prog_name[MAX_PROG_FULL_NAME]; in prog_fd_by_nametag() local 847 get_prog_full_name(&info, fd, prog_name, in prog_fd_by_nametag() 848 sizeof(prog_name)); in prog_fd_by_nametag() 849 if (strncmp(nametag, prog_name, sizeof(prog_name))) { in prog_fd_by_nametag()
|