bpf: fix test suite to enable all unpriv program types
authorDaniel Borkmann <daniel@iogearbox.net>
Wed, 24 Oct 2018 20:05:43 +0000 (22:05 +0200)
committerAlexei Starovoitov <ast@kernel.org>
Fri, 26 Oct 2018 00:02:05 +0000 (17:02 -0700)
commit36641ad61db5ce9befd5eb0071abb36eaff16cfc
tree750b0afb983007773bc86776adeb0bfc9be1a43c
parent4a6998aff82a20a1aece86a186d8e5263f8b2315
bpf: fix test suite to enable all unpriv program types

Given BPF_PROG_TYPE_CGROUP_SKB program types are also valid in an
unprivileged setting, lets not omit these tests and potentially
have issues fall through the cracks. Make this more obvious by
adding a small test_as_unpriv() helper.

Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Acked-by: Alexei Starovoitov <ast@kernel.org>
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
tools/testing/selftests/bpf/test_verifier.c