selftests/bpf: Add test for freplace program with expected_attach_type
authorToke Høiland-Jørgensen <toke@redhat.com>
Fri, 24 Apr 2020 13:34:28 +0000 (15:34 +0200)
committerAlexei Starovoitov <ast@kernel.org>
Sat, 25 Apr 2020 00:34:30 +0000 (17:34 -0700)
commit1d8a0af5ee1ad219a9ebd9b43559b165bcb3ff40
treea26ba95e6cff26762f51193696a29df95026b497
parent03f87c0b45b177ba5f6b4a9bbe9f95e4aba31026
selftests/bpf: Add test for freplace program with expected_attach_type

This adds a new selftest that tests the ability to attach an freplace
program to a program type that relies on the expected_attach_type of the
target program to pass verification.

Signed-off-by: Toke Høiland-Jørgensen <toke@redhat.com>
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Link: https://lore.kernel.org/bpf/158773526831.293902.16011743438619684815.stgit@toke.dk
tools/testing/selftests/bpf/prog_tests/fexit_bpf2bpf.c
tools/testing/selftests/bpf/progs/connect4_prog.c
tools/testing/selftests/bpf/progs/freplace_connect4.c [new file with mode: 0644]