aboutsummaryrefslogtreecommitdiffstats
path: root/tools/testing/selftests/bpf/progs/socket_cookie_prog.c
diff options
context:
space:
mode:
authorFlorent Revest <revest@chromium.org>2021-02-10 12:14:04 +0100
committerAlexei Starovoitov <ast@kernel.org>2021-02-11 17:44:41 -0800
commit61f8c9c8f3c8fb60722f0f3168d1a546dbf8a3d4 (patch)
tree20e462cfca537597fb3e360747d723bc359889f9 /tools/testing/selftests/bpf/progs/socket_cookie_prog.c
parentbpf: Expose bpf_get_socket_cookie to tracing programs (diff)
downloadlinux-61f8c9c8f3c8fb60722f0f3168d1a546dbf8a3d4.tar.gz
linux-61f8c9c8f3c8fb60722f0f3168d1a546dbf8a3d4.zip
selftests/bpf: Integrate the socket_cookie test to test_progs
Currently, the selftest for the BPF socket_cookie helpers is built and run independently from test_progs. It's easy to forget and hard to maintain. This patch moves the socket cookies test into prog_tests/ and vastly simplifies its logic by: - rewriting the loading code with BPF skeletons - rewriting the server/client code with network helpers - rewriting the cgroup code with test__join_cgroup - rewriting the error handling code with CHECKs Signed-off-by: Florent Revest <revest@chromium.org> Signed-off-by: Alexei Starovoitov <ast@kernel.org> Acked-by: KP Singh <kpsingh@kernel.org> Acked-by: Andrii Nakryiko <andrii@kernel.org> Link: https://lore.kernel.org/bpf/20210210111406.785541-3-revest@chromium.org
Diffstat (limited to 'tools/testing/selftests/bpf/progs/socket_cookie_prog.c')
-rw-r--r--tools/testing/selftests/bpf/progs/socket_cookie_prog.c2
1 files changed, 0 insertions, 2 deletions
diff --git a/tools/testing/selftests/bpf/progs/socket_cookie_prog.c b/tools/testing/selftests/bpf/progs/socket_cookie_prog.c
index 0cb5656a22b0..81e84be6f86d 100644
--- a/tools/testing/selftests/bpf/progs/socket_cookie_prog.c
+++ b/tools/testing/selftests/bpf/progs/socket_cookie_prog.c
@@ -65,6 +65,4 @@ int update_cookie(struct bpf_sock_ops *ctx)
return 1;
}
-int _version SEC("version") = 1;
-
char _license[] SEC("license") = "GPL";