Closed WOnder93 closed 5 years ago
As noted on the list, I don't think we want to silently skip/disable tests when the kernel and policy support them, and the requisite library is listed as a dependency in the README so I don't think we want this change.
If the concern is that this break older RHEL releases that might not have that package available at all, then generally we have handled that by excluding the test for that RHEL release in tests/Makefile rather than based on the presence of the header.
Closing, as I agree with @stephensmalley that this is not a good way to fix handle distros that just don't have libbpf-devel
available.
Check for the existence of the <bpf/bpf.h> header before enabling BPF testing. Otherwise building the tests fails in an environment where the kernel and policy support BPF, but the library is not installed.
Fixes: 8f0f980a4ad5 ("selinux-testsuite: Add BPF tests") Signed-off-by: Ondrej Mosnacek omosnace@redhat.com