selftests/bpf: Move IPv4 and IPv6 sockaddr test cases
authorJordan Rife <jrife@google.com>
Mon, 29 Apr 2024 21:45:21 +0000 (16:45 -0500)
committerMartin KaFai Lau <martin.lau@kernel.org>
Thu, 2 May 2024 22:23:25 +0000 (15:23 -0700)
commit8a9d22b8aeb2182cfe83991f11a88b3351084d3e
tree3537da922bc2becfa3c0230e14ef6078a1fa0f1f
parent15b6671efa508ff9c1fb995452913f8de85db73b
selftests/bpf: Move IPv4 and IPv6 sockaddr test cases

This patch lays the groundwork for testing IPv4 and IPv6 sockaddr hooks
and their interaction with both socket syscalls and kernel functions
(e.g. kernel_connect, kernel_bind, etc.). It moves some of the test
cases from the old-style bpf/test_sock_addr.c self test into the
sock_addr prog_test in a step towards fully retiring
bpf/test_sock_addr.c. We will expand the test dimensions in the
sock_addr prog_test in a later patch series in order to migrate the
remaining test cases.

Signed-off-by: Jordan Rife <jrife@google.com>
Link: https://lore.kernel.org/r/20240429214529.2644801-5-jrife@google.com
Signed-off-by: Martin KaFai Lau <martin.lau@kernel.org>
tools/testing/selftests/bpf/prog_tests/sock_addr.c
tools/testing/selftests/bpf/test_sock_addr.c