On 11/3/21 6:08 PM, Andrii Nakryiko wrote: > -Dbpf_prog_load_deprecated=bpf_prog_test_load trick is both ugly and > breaks when deprecation goes into effect due to macro magic. Convert all > the uses to explicit bpf_prog_test_load() calls which avoid deprecation > errors and makes everything less magical. > > Signed-off-by: Andrii Nakryiko <andrii@xxxxxxxxxx> > --- Acked-by: Dave Marchevsky <davemarchevsky@xxxxxx> > tools/testing/selftests/bpf/Makefile | 2 +- > .../selftests/bpf/flow_dissector_load.h | 3 ++- > .../testing/selftests/bpf/get_cgroup_id_user.c | 5 +++-- > .../selftests/bpf/prog_tests/bpf_obj_id.c | 2 +- > .../selftests/bpf/prog_tests/fexit_bpf2bpf.c | 8 ++++---- > .../bpf/prog_tests/get_stack_raw_tp.c | 4 ++-- > .../selftests/bpf/prog_tests/global_data.c | 2 +- > .../bpf/prog_tests/global_func_args.c | 2 +- > .../selftests/bpf/prog_tests/kfree_skb.c | 2 +- > .../selftests/bpf/prog_tests/l4lb_all.c | 2 +- > .../bpf/prog_tests/load_bytes_relative.c | 2 +- > .../selftests/bpf/prog_tests/map_lock.c | 4 ++-- > .../selftests/bpf/prog_tests/pkt_access.c | 2 +- > .../selftests/bpf/prog_tests/pkt_md_access.c | 2 +- > .../selftests/bpf/prog_tests/queue_stack_map.c | 2 +- > .../testing/selftests/bpf/prog_tests/skb_ctx.c | 2 +- > .../selftests/bpf/prog_tests/skb_helpers.c | 2 +- > .../selftests/bpf/prog_tests/spinlock.c | 4 ++-- > .../selftests/bpf/prog_tests/stacktrace_map.c | 2 +- > .../bpf/prog_tests/stacktrace_map_raw_tp.c | 2 +- > .../selftests/bpf/prog_tests/tailcalls.c | 18 +++++++++--------- > .../bpf/prog_tests/task_fd_query_rawtp.c | 2 +- > .../bpf/prog_tests/task_fd_query_tp.c | 4 ++-- > .../selftests/bpf/prog_tests/tcp_estats.c | 2 +- > .../selftests/bpf/prog_tests/tp_attach_query.c | 2 +- > tools/testing/selftests/bpf/prog_tests/xdp.c | 2 +- > .../selftests/bpf/prog_tests/xdp_adjust_tail.c | 6 +++--- > .../selftests/bpf/prog_tests/xdp_attach.c | 6 +++--- > .../selftests/bpf/prog_tests/xdp_info.c | 2 +- > .../selftests/bpf/prog_tests/xdp_perf.c | 2 +- > .../selftests/bpf/progs/fexit_bpf2bpf.c | 2 +- > tools/testing/selftests/bpf/test_dev_cgroup.c | 3 ++- > .../selftests/bpf/test_lirc_mode2_user.c | 6 ++++-- > tools/testing/selftests/bpf/test_maps.c | 7 ++++--- > tools/testing/selftests/bpf/test_sysctl.c | 1 + > .../selftests/bpf/test_tcpnotify_user.c | 3 ++- > tools/testing/selftests/bpf/xdping.c | 3 ++- > 37 files changed, 68 insertions(+), 59 deletions(-) [...]