Skip to content

Commit

Permalink
selftests/bpf: Test sysctl section name
Browse files Browse the repository at this point in the history
Add unit test to verify that program and attach types are properly
identified for "cgroup/sysctl" section name.

Signed-off-by: Andrey Ignatov <rdna@fb.com>
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
  • Loading branch information
Andrey Ignatov authored and Alexei Starovoitov committed Apr 12, 2019
1 parent 063cc9f commit 7007af6
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions tools/testing/selftests/bpf/test_section_names.c
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,11 @@ static struct sec_name_test tests[] = {
{0, BPF_PROG_TYPE_CGROUP_SOCK_ADDR, BPF_CGROUP_UDP6_SENDMSG},
{0, BPF_CGROUP_UDP6_SENDMSG},
},
{
"cgroup/sysctl",
{0, BPF_PROG_TYPE_CGROUP_SYSCTL, BPF_CGROUP_SYSCTL},
{0, BPF_CGROUP_SYSCTL},
},
};

static int test_prog_type_by_name(const struct sec_name_test *test)
Expand Down

0 comments on commit 7007af6

Please sign in to comment.