]> git.ipfire.org Git - thirdparty/linux.git/commit
selftests/bpf: Fix out-of-srctree build
authorIlya Leoshkevich <iii@linux.ibm.com>
Wed, 8 Feb 2023 23:12:11 +0000 (00:12 +0100)
committerDaniel Borkmann <daniel@iogearbox.net>
Mon, 13 Feb 2023 17:14:50 +0000 (18:14 +0100)
commit0b0757244754ea1d0721195c824770f5576e119e
tree8a250e0d5a2cf21839619bb3ce8c389d2d6d6ecc
parent0243d3dfe274832aa0a16214499c208122345173
selftests/bpf: Fix out-of-srctree build

Building BPF selftests out of srctree fails with:

  make: *** No rule to make target '/linux-build//ima_setup.sh', needed by 'ima_setup.sh'.  Stop.

The culprit is the rule that defines convenient shorthands like
"make test_progs", which builds $(OUTPUT)/test_progs. These shorthands
make sense only for binaries that are built though; scripts that live
in the source tree do not end up in $(OUTPUT).

Therefore drop $(TEST_PROGS) and $(TEST_PROGS_EXTENDED) from the rule.

The issue exists for a while, but it became a problem only after commit
d68ae4982cb7 ("selftests/bpf: Install all required files to run selftests"),
which added dependencies on these scripts.

Fixes: 03dcb78460c2 ("selftests/bpf: Add simple per-test targets to Makefile")
Signed-off-by: Ilya Leoshkevich <iii@linux.ibm.com>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Link: https://lore.kernel.org/bpf/20230208231211.283606-1-iii@linux.ibm.com
tools/testing/selftests/bpf/Makefile