Message ID | cover.1713613543.git.tanggeliang@kylinos.cn (mailing list archive) |
---|---|
Headers | show |
Series | use network helpers, part 2 | expand |
Superseded. v2 has just been sent out. Thanks, -Geliang On Sat, 2024-04-20 at 19:55 +0800, Geliang Tang wrote: > From: Geliang Tang <tanggeliang@kylinos.cn> > > This patchset uses more network helpers in test_sock_addr.c, but > first of all, patch 2 is needed to make network_helpers.c independent > of test_progs.c. Then network_helpers.h can be included into > test_sock_addr.c without compile errors. > > Patch 1 and patch 2 address Martin's comments for the previous series > too. > > Geliang Tang (5): > selftests/bpf: Fix a fd leak in error paths in open_netns > selftests/bpf: Use log_err in open_netns/close_netns > selftests/bpf: Use start_server_addr in test_sock_addr > selftests/bpf: Use connect_to_addr in test_sock_addr > selftests/bpf: Use make_sockaddr in test_sock_addr > > tools/testing/selftests/bpf/Makefile | 3 +- > tools/testing/selftests/bpf/network_helpers.c | 20 ++- > tools/testing/selftests/bpf/network_helpers.h | 1 + > .../selftests/bpf/prog_tests/empty_skb.c | 2 + > .../bpf/prog_tests/ip_check_defrag.c | 2 + > .../selftests/bpf/prog_tests/tc_redirect.c | 2 +- > .../selftests/bpf/prog_tests/test_tunnel.c | 4 + > .../selftests/bpf/prog_tests/xdp_metadata.c | 16 +++ > tools/testing/selftests/bpf/test_sock_addr.c | 136 +++------------- > -- > 9 files changed, 61 insertions(+), 125 deletions(-) >
From: Geliang Tang <tanggeliang@kylinos.cn> This patchset uses more network helpers in test_sock_addr.c, but first of all, patch 2 is needed to make network_helpers.c independent of test_progs.c. Then network_helpers.h can be included into test_sock_addr.c without compile errors. Patch 1 and patch 2 address Martin's comments for the previous series too. Geliang Tang (5): selftests/bpf: Fix a fd leak in error paths in open_netns selftests/bpf: Use log_err in open_netns/close_netns selftests/bpf: Use start_server_addr in test_sock_addr selftests/bpf: Use connect_to_addr in test_sock_addr selftests/bpf: Use make_sockaddr in test_sock_addr tools/testing/selftests/bpf/Makefile | 3 +- tools/testing/selftests/bpf/network_helpers.c | 20 ++- tools/testing/selftests/bpf/network_helpers.h | 1 + .../selftests/bpf/prog_tests/empty_skb.c | 2 + .../bpf/prog_tests/ip_check_defrag.c | 2 + .../selftests/bpf/prog_tests/tc_redirect.c | 2 +- .../selftests/bpf/prog_tests/test_tunnel.c | 4 + .../selftests/bpf/prog_tests/xdp_metadata.c | 16 +++ tools/testing/selftests/bpf/test_sock_addr.c | 136 +++--------------- 9 files changed, 61 insertions(+), 125 deletions(-)