summaryrefslogtreecommitdiff
path: root/tools/testing
diff options
context:
space:
mode:
authorTony Ambardar <tony.ambardar@gmail.com>2025-01-24 23:14:23 -0800
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2025-04-10 14:44:23 +0200
commit8b89a136171b39fa9adb64cb7a50967b24f92503 (patch)
tree213afb777e6882db17e479fd9e4309bc6d93a8a2 /tools/testing
parent3652935a92cc95903c6a6ccda98672f5139da783 (diff)
downloadlinux-8b89a136171b39fa9adb64cb7a50967b24f92503.tar.gz
linux-8b89a136171b39fa9adb64cb7a50967b24f92503.tar.bz2
linux-8b89a136171b39fa9adb64cb7a50967b24f92503.zip
selftests/bpf: Fix runqslower cross-endian build
[ Upstream commit cb3ade567816a03d1ac1c33bf86073574efcfcaf ] The runqslower binary from a cross-endian build currently fails to run because the included skeleton has host endianness. Fix this by passing the target BPF endianness to the runqslower sub-make. Fixes: 5a63c33d6f00 ("selftests/bpf: Support cross-endian building") Signed-off-by: Tony Ambardar <tony.ambardar@gmail.com> Signed-off-by: Andrii Nakryiko <andrii@kernel.org> Link: https://lore.kernel.org/bpf/20250125071423.2603588-1-itugrok@yahoo.com Signed-off-by: Alexei Starovoitov <ast@kernel.org> Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'tools/testing')
-rw-r--r--tools/testing/selftests/bpf/Makefile1
1 files changed, 1 insertions, 0 deletions
diff --git a/tools/testing/selftests/bpf/Makefile b/tools/testing/selftests/bpf/Makefile
index 87551628e112..6722080b2107 100644
--- a/tools/testing/selftests/bpf/Makefile
+++ b/tools/testing/selftests/bpf/Makefile
@@ -306,6 +306,7 @@ $(OUTPUT)/runqslower: $(BPFOBJ) | $(DEFAULT_BPFTOOL) $(RUNQSLOWER_OUTPUT)
BPFTOOL_OUTPUT=$(HOST_BUILD_DIR)/bpftool/ \
BPFOBJ_OUTPUT=$(BUILD_DIR)/libbpf/ \
BPFOBJ=$(BPFOBJ) BPF_INCLUDE=$(INCLUDE_DIR) \
+ BPF_TARGET_ENDIAN=$(BPF_TARGET_ENDIAN) \
EXTRA_CFLAGS='-g $(OPT_FLAGS) $(SAN_CFLAGS) $(EXTRA_CFLAGS)' \
EXTRA_LDFLAGS='$(SAN_LDFLAGS) $(EXTRA_LDFLAGS)' && \
cp $(RUNQSLOWER_OUTPUT)runqslower $@