From: Stanislav Fomichev Date: Thu, 27 Jun 2019 20:38:50 +0000 (-0700) Subject: selftests/bpf: test sockopt section name X-Git-Tag: v5.4-rc1~616^2~65^2~8^2~5 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=47ac90bbce5b9f7c1c600a4c81fcfd78cb674798;p=platform%2Fkernel%2Flinux-rpi.git selftests/bpf: test sockopt section name Add tests that make sure libbpf section detection works. Cc: Andrii Nakryiko Cc: Martin Lau Signed-off-by: Stanislav Fomichev Signed-off-by: Alexei Starovoitov --- diff --git a/tools/testing/selftests/bpf/test_section_names.c b/tools/testing/selftests/bpf/test_section_names.c index dee2f2e..29833ae 100644 --- a/tools/testing/selftests/bpf/test_section_names.c +++ b/tools/testing/selftests/bpf/test_section_names.c @@ -134,6 +134,16 @@ static struct sec_name_test tests[] = { {0, BPF_PROG_TYPE_CGROUP_SYSCTL, BPF_CGROUP_SYSCTL}, {0, BPF_CGROUP_SYSCTL}, }, + { + "cgroup/getsockopt", + {0, BPF_PROG_TYPE_CGROUP_SOCKOPT, BPF_CGROUP_GETSOCKOPT}, + {0, BPF_CGROUP_GETSOCKOPT}, + }, + { + "cgroup/setsockopt", + {0, BPF_PROG_TYPE_CGROUP_SOCKOPT, BPF_CGROUP_SETSOCKOPT}, + {0, BPF_CGROUP_SETSOCKOPT}, + }, }; static int test_prog_type_by_name(const struct sec_name_test *test)