selftests/bpf: Build testing_helpers.o out of tree
authorJean-Philippe Brucker <jean-philippe@linaro.org>
Wed, 1 Dec 2021 14:51:02 +0000 (14:51 +0000)
committerAndrii Nakryiko <andrii@kernel.org>
Thu, 2 Dec 2021 19:55:41 +0000 (11:55 -0800)
commiteee9a6df0eed6481d5448a55b218a45868b41b5b
tree16ca37e3035202250bed01ff216fdd5db7e0f4d3
parent7fb4d48dc255cf186ecd11cadf34f56cd10bf3b7
selftests/bpf: Build testing_helpers.o out of tree

Add $(OUTPUT) prefix to testing_helpers.o, so it can be built out of
tree when necessary. At the moment, in addition to being built in-tree
even when out-of-tree is required, testing_helpers.o is not built with
the right recipe when cross-building.

For consistency the other helpers, cgroup_helpers and trace_helpers, can
also be passed as objects instead of source. Use *_HELPERS variable to
keep the Makefile readable.

Fixes: f87c1930ac29 ("selftests/bpf: Merge test_stub.c into testing_helpers.c")
Signed-off-by: Jean-Philippe Brucker <jean-philippe@linaro.org>
Signed-off-by: Andrii Nakryiko <andrii@kernel.org>
Link: https://lore.kernel.org/bpf/20211201145101.823159-1-jean-philippe@linaro.org
tools/testing/selftests/bpf/Makefile