Skip to content

Commit 3a0d309

Browse files
anakryikoAlexei Starovoitov
authored andcommitted
selftests/bpf: Build runqslower from selftests
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
1 parent 9c01546 commit 3a0d309

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

tools/bpf/runqslower/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ CFLAGS := -g -Wall
1010

1111
# Try to detect best kernel BTF source
1212
KERNEL_REL := $(shell uname -r)
13-
ifneq ("$(wildcard /sys/kenerl/btf/vmlinux)","")
13+
ifneq ("$(wildcard /sys/kernel/btf/vmlinux)","")
1414
VMLINUX_BTF := /sys/kernel/btf/vmlinux
1515
else ifneq ("$(wildcard /boot/vmlinux-$(KERNEL_REL))","")
1616
VMLINUX_BTF := /boot/vmlinux-$(KERNEL_REL)

tools/testing/selftests/bpf/Makefile

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ TEST_PROGS_EXTENDED := with_addr.sh \
7373
# Compile but not part of 'make run_tests'
7474
TEST_GEN_PROGS_EXTENDED = test_sock_addr test_skb_cgroup_id_user \
7575
flow_dissector_load test_flow_dissector test_tcp_check_syncookie_user \
76-
test_lirc_mode2_user xdping test_cpp
76+
test_lirc_mode2_user xdping test_cpp runqslower
7777

7878
TEST_CUSTOM_PROGS = urandom_read
7979

@@ -124,6 +124,11 @@ $(OUTPUT)/test_stub.o: test_stub.c
124124
$(call msg,CC,,$@)
125125
$(CC) -c $(CFLAGS) -o $@ $<
126126

127+
.PHONY: $(OUTPUT)/runqslower
128+
$(OUTPUT)/runqslower: force
129+
$(Q)$(MAKE) $(submake_extras) -C $(TOOLSDIR)/bpf/runqslower \
130+
OUTPUT=$(CURDIR)/tools/
131+
127132
BPFOBJ := $(OUTPUT)/libbpf.a
128133

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

0 commit comments

Comments
 (0)