Skip to content

Commit

Permalink
selftests/bpf: Build runqslower from selftests
Browse files Browse the repository at this point in the history
Ensure runqslower tool is built as part of selftests to prevent it from bit
rotting.

Signed-off-by: Andrii Nakryiko <andriin@fb.com>
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Link: https://lore.kernel.org/bpf/20200113073143.1779940-7-andriin@fb.com
  • Loading branch information
Andrii Nakryiko authored and Alexei Starovoitov committed Jan 14, 2020
1 parent 9c01546 commit 3a0d309
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
2 changes: 1 addition & 1 deletion tools/bpf/runqslower/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ CFLAGS := -g -Wall

# Try to detect best kernel BTF source
KERNEL_REL := $(shell uname -r)
ifneq ("$(wildcard /sys/kenerl/btf/vmlinux)","")
ifneq ("$(wildcard /sys/kernel/btf/vmlinux)","")
VMLINUX_BTF := /sys/kernel/btf/vmlinux
else ifneq ("$(wildcard /boot/vmlinux-$(KERNEL_REL))","")
VMLINUX_BTF := /boot/vmlinux-$(KERNEL_REL)
Expand Down
7 changes: 6 additions & 1 deletion tools/testing/selftests/bpf/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ TEST_PROGS_EXTENDED := with_addr.sh \
# Compile but not part of 'make run_tests'
TEST_GEN_PROGS_EXTENDED = test_sock_addr test_skb_cgroup_id_user \
flow_dissector_load test_flow_dissector test_tcp_check_syncookie_user \
test_lirc_mode2_user xdping test_cpp
test_lirc_mode2_user xdping test_cpp runqslower

TEST_CUSTOM_PROGS = urandom_read

Expand Down Expand Up @@ -124,6 +124,11 @@ $(OUTPUT)/test_stub.o: test_stub.c
$(call msg,CC,,$@)
$(CC) -c $(CFLAGS) -o $@ $<

.PHONY: $(OUTPUT)/runqslower
$(OUTPUT)/runqslower: force
$(Q)$(MAKE) $(submake_extras) -C $(TOOLSDIR)/bpf/runqslower \
OUTPUT=$(CURDIR)/tools/

BPFOBJ := $(OUTPUT)/libbpf.a

$(TEST_GEN_PROGS) $(TEST_GEN_PROGS_EXTENDED): $(OUTPUT)/test_stub.o $(BPFOBJ)
Expand Down

0 comments on commit 3a0d309

Please sign in to comment.