From: Pu Lehui <pulehui@xxxxxxxxxx> 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@xxxxxxxxxx> --- 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