aboutsummaryrefslogtreecommitdiffstats
path: root/tools/bpf/bpftool/prog.c
diff options
context:
space:
mode:
authorAditi Ghag <[email protected]>2023-05-19 22:51:57 +0000
committerMartin KaFai Lau <[email protected]>2023-05-20 05:44:28 +0000
commit1a8bc2299f4028e9bac36020ffaaec27a0dfb9c1 (patch)
tree3ad42c66005ca05fd9774e0fb61e572754d4ca43 /tools/bpf/bpftool/prog.c
parentselftests/bpf: Add helper to get port using getsockname (diff)
downloadkernel-1a8bc2299f4028e9bac36020ffaaec27a0dfb9c1.tar.gz
kernel-1a8bc2299f4028e9bac36020ffaaec27a0dfb9c1.zip
selftests/bpf: Test bpf_sock_destroy
The test cases for destroying sockets mirror the intended usages of the bpf_sock_destroy kfunc using iterators. The destroy helpers set `ECONNABORTED` error code that we can validate in the test code with client sockets. But UDP sockets have an overriding error code from `disconnect()` called during abort, so the error code validation is only done for TCP sockets. The failure test cases validate that the `bpf_sock_destroy` kfunc is not allowed from program attach types other than BPF trace iterator, and such programs fail to load. Signed-off-by: Aditi Ghag <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Martin KaFai Lau <[email protected]>
Diffstat (limited to 'tools/bpf/bpftool/prog.c')
0 files changed, 0 insertions, 0 deletions