On Mon, Dec 13, 2021 at 2:19 PM Andrii Nakryiko <andrii.nakryiko@xxxxxxxxx> wrote: > > On Fri, Dec 10, 2021 at 4:36 PM Kui-Feng Lee <kuifeng@xxxxxx> wrote: > > > > bpf_object__find_program_by_title is going to be deprecated. Replace > > all use cases in tools/testing/selftests/bpf with > > bpf_object__find_program_by_name. > > > > Signed-off-by: Kui-Feng Lee <kuifeng@xxxxxx> > > --- > > seems like these changes are breaking one selftest. Here's partial > failure, please take a look and fix. Actually, it seems BPF CI is back up, so you can see full logs at [0] as well. [0] https://github.com/kernel-patches/bpf/runs/4510836943?check_suite_focus=true > > #48/3 fexit_bpf2bpf/func_replace:FAIL > test_fexit_bpf2bpf_common:PASS:tgt_prog_load 0 nsec > test_fexit_bpf2bpf_common:PASS:tgt_fd_get_info 0 nsec > test_fexit_bpf2bpf_common:PASS:link_ptr 0 nsec > test_fexit_bpf2bpf_common:PASS:prog_ptr 0 nsec > test_fexit_bpf2bpf_common:PASS:obj_open 0 nsec > test_fexit_bpf2bpf_common:PASS:set_attach_target 0 nsec > test_fexit_bpf2bpf_common:PASS:obj_load 0 nsec > test_fexit_bpf2bpf_common:PASS:new_do_bind 0 nsec > test_fexit_bpf2bpf_common:PASS:attach_trace 0 nsec > test_fexit_bpf2bpf_common:PASS:link_fd_get_info 0 nsec > test_fexit_bpf2bpf_common:PASS:link_attach_type 0 nsec > test_fexit_bpf2bpf_common:PASS:link_tgt_obj_id 0 nsec > test_fexit_bpf2bpf_common:FAIL:link_tgt_btf_id unexpected > link_tgt_btf_id: actual 11 != expected -2 > #48/4 fexit_bpf2bpf/func_replace_verify:FAIL > test_fexit_bpf2bpf_common:PASS:tgt_prog_load 0 nsec > test_fexit_bpf2bpf_common:PASS:tgt_fd_get_info 0 nsec > test_fexit_bpf2bpf_common:PASS:link_ptr 0 nsec > test_fexit_bpf2bpf_common:PASS:prog_ptr 0 nsec > test_fexit_bpf2bpf_common:PASS:obj_open 0 nsec > test_fexit_bpf2bpf_common:PASS:set_attach_target 0 nsec > test_fexit_bpf2bpf_common:PASS:obj_load 0 nsec > test_fexit_bpf2bpf_common:PASS:freplace_cls_redirect_test 0 nsec > test_fexit_bpf2bpf_common:PASS:attach_trace 0 nsec > test_fexit_bpf2bpf_common:PASS:link_fd_get_info 0 nsec > test_fexit_bpf2bpf_common:PASS:link_attach_type 0 nsec > test_fexit_bpf2bpf_common:PASS:link_tgt_obj_id 0 nsec > test_fexit_bpf2bpf_common:FAIL:link_tgt_btf_id unexpected > link_tgt_btf_id: actual 28 != expected -2 > #48/5 fexit_bpf2bpf/func_sockmap_update:FAIL > test_obj_load_failure_common:PASS:tgt_prog_load 0 nsec > test_obj_load_failure_common:PASS:obj_open 0 nsec > test_obj_load_failure_common:PASS:set_attach_target 0 nsec > libbpf: prog 'new_connect_v4_prog': BPF program load failed: Invalid argument > libbpf: prog 'new_connect_v4_prog': -- BEGIN PROG LOAD LOG -- > Validating new_connect_v4_prog() func#0... > ; return 255; > 0: (b4) w0 = 255 > 1: (95) exit > At program exit the register R0 has value (0xff; 0x0) should have been > in (0x0; 0x1) > processed 2 insns (limit 1000000) max_states_per_insn 0 total_states 0 > peak_states 0 mark_read 0 > -- END PROG LOAD LOG -- > libbpf: failed to load program 'new_connect_v4_prog' > libbpf: failed to load object './freplace_connect_v4_prog.o' > test_obj_load_failure_common:PASS:bpf_obj_load should fail 0 nsec > #48/6 fexit_bpf2bpf/func_replace_return_code:OK > test_obj_load_failure_common:PASS:tgt_prog_load 0 nsec > test_obj_load_failure_common:PASS:obj_open 0 nsec > test_obj_load_failure_common:PASS:set_attach_target 0 nsec > libbpf: prog 'new_handle_kprobe': BPF program load failed: Invalid argument > libbpf: prog 'new_handle_kprobe': -- BEGIN PROG LOAD LOG -- > Cannot replace static functions > processed 0 insns (limit 1000000) max_states_per_insn 0 total_states 0 > peak_states 0 mark_read 0 > -- END PROG LOAD LOG -- > libbpf: failed to load program 'new_handle_kprobe' > libbpf: failed to load object './freplace_attach_probe.o' > test_obj_load_failure_common:PASS:bpf_obj_load should fail 0 nsec > #48/7 fexit_bpf2bpf/func_map_prog_compatibility:OK > test_fexit_bpf2bpf_common:PASS:tgt_prog_load 0 nsec > test_fexit_bpf2bpf_common:PASS:tgt_fd_get_info 0 nsec > test_fexit_bpf2bpf_common:PASS:link_ptr 0 nsec > test_fexit_bpf2bpf_common:PASS:prog_ptr 0 nsec > test_fexit_bpf2bpf_common:PASS:obj_open 0 nsec > test_fexit_bpf2bpf_common:PASS:set_attach_target 0 nsec > test_fexit_bpf2bpf_common:PASS:obj_load 0 nsec > test_fexit_bpf2bpf_common:PASS:security_new_get_constant 0 nsec > test_fexit_bpf2bpf_common:PASS:attach_trace 0 nsec > test_fexit_bpf2bpf_common:PASS:link_fd_get_info 0 nsec > test_fexit_bpf2bpf_common:PASS:link_attach_type 0 nsec > test_fexit_bpf2bpf_common:PASS:link_tgt_obj_id 0 nsec > test_fexit_bpf2bpf_common:FAIL:link_tgt_btf_id unexpected > link_tgt_btf_id: actual 19 != expected -2 > test_second_attach:PASS:find_prog 0 nsec > test_second_attach:PASS:second_prog_load 0 nsec > test_second_attach:PASS:second_link 0 nsec > test_second_attach:PASS:ipv6 885 nsec > check_data_map:PASS:alloc_memory 0 nsec > check_data_map:PASS:find_data_map 0 nsec > check_data_map:PASS:get_result 0 nsec > check_data_map:PASS:result 0 nsec > check_data_map:PASS:reset_result 0 nsec > test_fexit_bpf2bpf_common:PASS:prog_run 0 nsec > test_fexit_bpf2bpf_common:PASS:prog_run_ret 0 nsec > check_data_map:PASS:alloc_memory 0 nsec > check_data_map:PASS:find_data_map 0 nsec > check_data_map:PASS:get_result 0 nsec > check_data_map:PASS:result 0 nsec > #48/8 fexit_bpf2bpf/func_replace_multi:FAIL > test_fmod_ret_freplace:PASS:tgt_prog_load 0 nsec > test_fmod_ret_freplace:PASS:freplace_obj_open 0 nsec > test_fmod_ret_freplace:PASS:freplace__set_attach_target 0 nsec > test_fmod_ret_freplace:PASS:freplace_obj_load 0 nsec > test_fmod_ret_freplace:PASS:freplace_attach_trace 0 nsec > test_fmod_ret_freplace:PASS:fmod_obj_open 0 nsec > test_fmod_ret_freplace:PASS:fmod_ret_set_attach_target 0 nsec > libbpf: prog 'fmod_ret_test': BPF program load failed: Invalid argument > libbpf: prog 'fmod_ret_test': -- BEGIN PROG LOAD LOG -- > can't modify return codes of BPF programs > processed 0 insns (limit 1000000) max_states_per_insn 0 total_states 0 > peak_states 0 mark_read 0 > -- END PROG LOAD LOG -- > libbpf: failed to load program 'fmod_ret_test' > libbpf: failed to load object './fmod_ret_freplace.o' > test_fmod_ret_freplace:PASS:fmod_obj_load 0 nsec > #48/9 fexit_bpf2bpf/fmod_ret_freplace:OK > Summary: 0/3 PASSED, 0 SKIPPED, 1 FAILED > > > > .../selftests/bpf/prog_tests/bpf_obj_id.c | 4 +- > > .../bpf/prog_tests/connect_force_port.c | 18 ++--- > > .../selftests/bpf/prog_tests/core_reloc.c | 79 +++++++++++++------ > > .../selftests/bpf/prog_tests/fexit_bpf2bpf.c | 46 +++++------ > > .../bpf/prog_tests/get_stack_raw_tp.c | 4 +- > > .../bpf/prog_tests/sockopt_inherit.c | 15 ++-- > > .../selftests/bpf/prog_tests/stacktrace_map.c | 4 +- > > .../bpf/prog_tests/stacktrace_map_raw_tp.c | 4 +- > > .../selftests/bpf/prog_tests/test_overhead.c | 20 ++--- > > .../bpf/prog_tests/trampoline_count.c | 6 +- > > 10 files changed, 112 insertions(+), 88 deletions(-) > > > > [...]