]> git.baikalelectronics.ru Git - kernel.git/commit
selftests/bpf: Only run tests if !bpf_disabled
authorJoe Stringer <joe@wand.net.nz>
Wed, 14 Feb 2018 21:50:36 +0000 (13:50 -0800)
committerDaniel Borkmann <daniel@iogearbox.net>
Thu, 15 Feb 2018 09:22:55 +0000 (10:22 +0100)
commit64093adbb5defb1a370c414de1a5d962a2de3345
treeb0a75aef54e4be2611578f072b98536e4156afcc
parent0b1f4e661ad93b43e50ac66647266e5e1cb667e2
selftests/bpf: Only run tests if !bpf_disabled

The "kernel.unprivileged_bpf_disabled" sysctl, if enabled, causes all
unprivileged tests to fail because it permanently disables unprivileged
BPF access for the currently running kernel. Skip the relevant tests if
the user attempts to run the testsuite with this sysctl enabled.

Signed-off-by: Joe Stringer <joe@wand.net.nz>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
tools/testing/selftests/bpf/test_verifier.c