]> git.baikalelectronics.ru Git - kernel.git/commit
selftests/bpf: Ensure bpf_helper_defs.h are taken from selftests dir
authorAndrii Nakryiko <andriin@fb.com>
Fri, 10 Jan 2020 05:17:15 +0000 (21:17 -0800)
committerAlexei Starovoitov <ast@kernel.org>
Fri, 10 Jan 2020 05:55:08 +0000 (21:55 -0800)
commit7ec27c092068b6478a569eb5001b2f76d44ea12e
tree4817729063634f933adb744f1b33779370f58916
parentcef23c82191a66312c6408715a4c13564ce31640
selftests/bpf: Ensure bpf_helper_defs.h are taken from selftests dir

Reorder includes search path to ensure $(OUTPUT) and $(CURDIR) go before
libbpf's directory. Also fix bpf_helpers.h to include bpf_helper_defs.h in
such a way as to leverage includes search path. This allows selftests to not
use libbpf's local and potentially stale bpf_helper_defs.h. It's important
because selftests/bpf's Makefile only re-generates bpf_helper_defs.h in
seltests' output directory, not the one in libbpf's directory.

Also force regeneration of bpf_helper_defs.h when libbpf.a is updated to
reduce staleness.

Fixes: 04a4e62bb30d ("libbpf: Fix build on read-only filesystems")
Reported-by: Alexei Starovoitov <ast@kernel.org>
Signed-off-by: Andrii Nakryiko <andriin@fb.com>
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Link: https://lore.kernel.org/bpf/20200110051716.1591485-3-andriin@fb.com
tools/lib/bpf/bpf_helpers.h
tools/testing/selftests/bpf/Makefile