selftests/bpf: Prevent runqslower from racing on building bpftool
authorAndrii Nakryiko <andriin@fb.com>
Wed, 5 Aug 2020 00:47:57 +0000 (17:47 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 21 Aug 2020 11:07:40 +0000 (13:07 +0200)
commit27770820e9fa1a649e2984b9f0b0c9f2eabac2a5
tree5974c5cc2c19219d3ee36aa265a244f2e13ca1f3
parentca77100cb07abada01a5a392444c2a491d4dea90
selftests/bpf: Prevent runqslower from racing on building bpftool

[ Upstream commit 6bcaf41f9613278cd5897fc80ab93033bda8efaa ]

runqslower's Makefile is building/installing bpftool into
$(OUTPUT)/sbin/bpftool, which coincides with $(DEFAULT_BPFTOOL). In practice
this means that often when building selftests from scratch (after `make
clean`), selftests are racing with runqslower to simultaneously build bpftool
and one of the two processes fail due to file being busy. Prevent this race by
explicitly order-depending on $(BPFTOOL_DEFAULT).

Fixes: a2c9652f751e ("selftests: Refactor build to remove tools/lib/bpf from include path")
Signed-off-by: Andrii Nakryiko <andriin@fb.com>
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Acked-by: John Fastabend <john.fastabend@gmail.com>
Link: https://lore.kernel.org/bpf/20200805004757.2960750-1-andriin@fb.com
Signed-off-by: Sasha Levin <sashal@kernel.org>
tools/testing/selftests/bpf/Makefile