linux-stable/tools
Quentin Monnet 87ee33bfdd selftests/bpf: Better clean up for runqslower in test_bpftool_build.sh
The script test_bpftool_build.sh attempts to build bpftool in the
various supported ways, to make sure nothing breaks.

One of those ways is to run "make tools/bpf" from the root of the kernel
repository. This command builds bpftool, along with the other tools
under tools/bpf, and runqslower in particular. After running the
command and upon a successful bpftool build, the script attempts to
cleanup the generated objects. However, after building with this target
and in the case of runqslower, the files are not cleaned up as expected.

This is because the "tools/bpf" target sets $(OUTPUT) to
.../tools/bpf/runqslower/ when building the tool, causing the object
files to be placed directly under the runqslower directory. But when
running "cd tools/bpf; make clean", the value for $(OUTPUT) is set to
".output" (relative to the runqslower directory) by runqslower's
Makefile, and this is where the Makefile looks for files to clean up.

We cannot easily fix in the root Makefile (where "tools/bpf" is defined)
or in tools/scripts/Makefile.include (setting $(OUTPUT)), where changing
the way the output variables are passed would likely have consequences
elsewhere. We could change runqslower's Makefile to build in the
repository instead of in a dedicated ".output/", but doing so just to
accommodate a test script doesn't sound great. Instead, let's just make
sure that we clean up runqslower properly by adding the correct command
to the script.

This will attempt to clean runqslower twice: the first try with command
"cd tools/bpf; make clean" will search for tools/bpf/runqslower/.output
and fail to clean it (but will still clean the other tools, in
particular bpftool), the second one (added in this commit) sets the
$(OUTPUT) variable like for building with the "tool/bpf" target and
should succeed.

Signed-off-by: Quentin Monnet <quentin@isovalent.com>
Signed-off-by: Andrii Nakryiko <andrii@kernel.org>
Link: https://lore.kernel.org/bpf/20211007194438.34443-12-quentin@isovalent.com
2021-10-08 12:02:38 -07:00
..
accounting
arch A set of fixes for X86: 2021-09-26 10:09:20 -07:00
bootconfig tools/bootconfig: Define memblock_free_ptr() to fix build error 2021-09-15 09:49:48 -07:00
bpf tools/runqslower: Install libbpf headers when building 2021-10-08 11:54:15 -07:00
build perf cs-etm: Update OpenCSD decoder for ETE 2021-09-03 08:16:00 -03:00
cgroup
debugging
edid
firewire
firmware
gpio
hv
iio
include bpf: Clarify data_len param in bpf_snprintf and bpf_seq_printf comments 2021-09-17 14:02:06 -07:00
io_uring tools/io_uring/io_uring-cp: sync with liburing example 2021-08-13 08:58:11 -06:00
kvm/kvm_stat
laptop
leds
lib libbpf: Skip re-installing headers file if source is older than target 2021-10-08 11:47:34 -07:00
memory-model
objtool
pci tools: PCI: Zero-initialize param 2021-08-05 11:01:30 +01:00
pcmcia
perf perf iostat: Fix Segmentation fault from NULL 'struct perf_counts_values *' 2021-09-27 09:41:07 -03:00
power
rcu
scripts
spi
testing selftests/bpf: Better clean up for runqslower in test_bpftool_build.sh 2021-10-08 12:02:38 -07:00
thermal/tmon tools/thermal/tmon: Add cross compiling support 2021-08-14 15:33:19 +02:00
time
tracing
usb usb: testusb: Fix for showing the connection speed 2021-09-14 10:31:41 +02:00
virtio tools/virtio: fix build 2021-08-11 06:44:24 -04:00
vm tools/vm/page-types: remove dependency on opt_file for idle page tracking 2021-09-24 16:13:35 -07:00
wmi
Makefile