[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20240904141951.1139090-4-pulehui@huaweicloud.com>
Date: Wed, 4 Sep 2024 14:19:44 +0000
From: Pu Lehui <pulehui@...weicloud.com>
To: bpf@...r.kernel.org,
linux-riscv@...ts.infradead.org,
netdev@...r.kernel.org
Cc: Andrii Nakryiko <andrii@...nel.org>,
Eduard Zingerman <eddyz87@...il.com>,
Mykola Lysenko <mykolal@...com>,
Björn Töpel <bjorn@...nel.org>,
Puranjay Mohan <puranjay@...nel.org>,
Alexei Starovoitov <ast@...nel.org>,
Daniel Borkmann <daniel@...earbox.net>,
Martin KaFai Lau <martin.lau@...ux.dev>,
Song Liu <song@...nel.org>,
Yonghong Song <yonghong.song@...ux.dev>,
John Fastabend <john.fastabend@...il.com>,
KP Singh <kpsingh@...nel.org>,
Stanislav Fomichev <sdf@...ichev.me>,
Hao Luo <haoluo@...gle.com>,
Jiri Olsa <jolsa@...nel.org>,
Palmer Dabbelt <palmer@...belt.com>,
Pu Lehui <pulehui@...wei.com>
Subject: [PATCH bpf-next v2 03/10] selftests/bpf: Disable feature-llvm for vmtest
From: Pu Lehui <pulehui@...wei.com>
After commit b991fc520700 ("selftests/bpf: utility function to get
program disassembly after jit"), Makefile will link libLLVM* related
libraries to the user binary execution file when detecting that
feature-llvm is enabled, which will cause the local vmtest to appear as
follows mistake:
./test_progs: error while loading shared libraries: libLLVM-17.so.1:
cannot open shared object file: No such file or directory
Considering that the get_jited_program_text() function is a useful tool
for user debugging and will not be relied upon by the entire bpf
selftests, let's turn it off in local vmtest.
Signed-off-by: Pu Lehui <pulehui@...wei.com>
---
tools/testing/selftests/bpf/Makefile | 2 ++
tools/testing/selftests/bpf/vmtest.sh | 2 +-
2 files changed, 3 insertions(+), 1 deletion(-)
diff --git a/tools/testing/selftests/bpf/Makefile b/tools/testing/selftests/bpf/Makefile
index 9905e3739dd0..47aa4f113fed 100644
--- a/tools/testing/selftests/bpf/Makefile
+++ b/tools/testing/selftests/bpf/Makefile
@@ -197,6 +197,7 @@ OUTPUT := $(patsubst %/,%,$(OUTPUT))
endif
endif
+ifneq ($(FORCE_FEAT_LLVM_OFF),1)
ifeq ($(feature-llvm),1)
LLVM_CFLAGS += -DHAVE_LLVM_SUPPORT
LLVM_CONFIG_LIB_COMPONENTS := mcdisassembler all-targets
@@ -209,6 +210,7 @@ ifeq ($(feature-llvm),1)
endif
LLVM_LDFLAGS += $(shell $(LLVM_CONFIG) --ldflags)
endif
+endif
SCRATCH_DIR := $(OUTPUT)/tools
BUILD_DIR := $(SCRATCH_DIR)/build
diff --git a/tools/testing/selftests/bpf/vmtest.sh b/tools/testing/selftests/bpf/vmtest.sh
index 65d14f3bbe30..ae2e5a5ca279 100755
--- a/tools/testing/selftests/bpf/vmtest.sh
+++ b/tools/testing/selftests/bpf/vmtest.sh
@@ -162,7 +162,7 @@ update_selftests()
local selftests_dir="${kernel_checkout}/tools/testing/selftests/bpf"
cd "${selftests_dir}"
- ${make_command}
+ FORCE_FEAT_LLVM_OFF=1 ${make_command}
# Mount the image and copy the selftests to the image.
mount_image
--
2.34.1
Powered by blists - more mailing lists