Skip to content

Commit 08e90da

Browse files
jemarchanakryiko
authored andcommitted
bpf: Missing trailing slash in tools/testing/selftests/bpf/Makefile
tools/lib/bpf/Makefile assumes that the patch in OUTPUT is a directory and that it includes a trailing slash. This seems to be a common expectation for OUTPUT among all the Makefiles. In the rule for runqslower in tools/testing/selftests/bpf/Makefile the variable BPFTOOL_OUTPUT is set to a directory name that lacks a trailing slash. This results in a malformed BPF_HELPER_DEFS being defined in lib/bpf/Makefile. This problem becomes evident when a file like tools/lib/bpf/bpf_tracing.h gets updated. This patch fixes the problem by adding the missing slash in the value for BPFTOOL_OUTPUT in the $(OUTPUT)/runqslower rule. Regtested by running selftests in bpf-next master and building samples/bpf programs. Signed-off-by: Jose E. Marchesi <jose.marchesi@oracle.com> Signed-off-by: Andrii Nakryiko <andrii@kernel.org> Link: https://lore.kernel.org/bpf/20240502140831.23915-1-jose.marchesi@oracle.com
1 parent 7c13ef1 commit 08e90da

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

tools/testing/selftests/bpf/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -262,7 +262,7 @@ $(OUTPUT)/runqslower: $(BPFOBJ) | $(DEFAULT_BPFTOOL) $(RUNQSLOWER_OUTPUT)
262262
$(Q)$(MAKE) $(submake_extras) -C $(TOOLSDIR)/bpf/runqslower \
263263
OUTPUT=$(RUNQSLOWER_OUTPUT) VMLINUX_BTF=$(VMLINUX_BTF) \
264264
BPFTOOL_OUTPUT=$(HOST_BUILD_DIR)/bpftool/ \
265-
BPFOBJ_OUTPUT=$(BUILD_DIR)/libbpf \
265+
BPFOBJ_OUTPUT=$(BUILD_DIR)/libbpf/ \
266266
BPFOBJ=$(BPFOBJ) BPF_INCLUDE=$(INCLUDE_DIR) \
267267
EXTRA_CFLAGS='-g $(OPT_FLAGS) $(SAN_CFLAGS)' \
268268
EXTRA_LDFLAGS='$(SAN_LDFLAGS)' && \

0 commit comments

Comments
 (0)