selftests/bpf: Fix strict mode calculation
authorMauricio Vásquez <mauricio@kinvolk.io>
Mon, 7 Feb 2022 14:50:52 +0000 (09:50 -0500)
committerAndrii Nakryiko <andrii@kernel.org>
Mon, 7 Feb 2022 20:12:22 +0000 (12:12 -0800)
commit2b9e2eadc9c899af3b508503677afecc85e44766
treeb8d7e24aafb893718faa5f2b195d5728467dd70b
parentda7af0aa20f8ad89f09d50d262e44cd5eafab816
selftests/bpf: Fix strict mode calculation

"(__LIBBPF_STRICT_LAST - 1) & ~LIBBPF_STRICT_MAP_DEFINITIONS" is wrong
as it is equal to 0 (LIBBPF_STRICT_NONE). Let's use
"LIBBPF_STRICT_ALL & ~LIBBPF_STRICT_MAP_DEFINITIONS" now that the
previous commit makes it possible in libbpf.

Fixes: 93b8952d223a ("libbpf: deprecate legacy BPF map definitions")
Signed-off-by: Mauricio Vásquez <mauricio@kinvolk.io>
Signed-off-by: Andrii Nakryiko <andrii@kernel.org>
Link: https://lore.kernel.org/bpf/20220207145052.124421-4-mauricio@kinvolk.io
tools/testing/selftests/bpf/prog_tests/btf.c