selftests/bpf: Migrate expected_attach_type tests

Migrates tests from progs/test_sock_addr.c ensuring that programs fail
to load when the expected attach type does not match.

Signed-off-by: Jordan Rife <jrife@google.com>
Link: https://lore.kernel.org/r/20240510190246.3247730-11-jrife@google.com
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
This commit is contained in:
Jordan Rife 2024-05-10 14:02:27 -05:00 • committed by Alexei Starovoitov
commit b0f3af0bff
2 changed files with 96 additions and 84 deletions