From patchwork Wed Sep 4 14:19:44 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Pu Lehui X-Patchwork-Id: 13790919 X-Patchwork-Delegate: bpf@iogearbox.net Received: from dggsgout12.his.huawei.com (dggsgout12.his.huawei.com [45.249.212.56]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 108A61DC195; Wed, 4 Sep 2024 14:17:13 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=45.249.212.56 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1725459436; cv=none; b=O9kemWGS+6UWke9DB3KSjQ71LRHlVkkhPfpxU590gXO824EZG1O4jELdNPLdzWDULdylyKAess4mrW4dQm75wPEg1UQg3VvLCl6hNYgWGrEukB1eb/ux/LGuQ6Of0MUvKA3rfA2s1X/NqrlA5gM4LFHb8YTY2TYBFMf/JD6K9Vc= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1725459436; c=relaxed/simple; bh=P1aEwb65+RNbY+g75ILEx7yadeCzbfJSxdXemOLCZhY=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=tKkKKrluSpjGqOd7L0dwp8Hne4Cr7cA++etdShuZFnuV7pvmfjGxX+TP6lWoZjmiObypnIXVGwJI/3qHQ5ZOVmaL4f5zIZbdklIE0m1et0zktTb6OkRvwkobYDnKxkVYoD9DBRLbbKcf2kFm/fC0WAKMIgoF626DzVPXxVai/bk= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=huaweicloud.com; spf=pass smtp.mailfrom=huaweicloud.com; arc=none smtp.client-ip=45.249.212.56 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=huaweicloud.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=huaweicloud.com Received: from mail.maildlp.com (unknown [172.19.93.142]) by dggsgout12.his.huawei.com (SkyGuard) with ESMTP id 4WzPgq59dZz4f3jdm; Wed, 4 Sep 2024 22:16:55 +0800 (CST) Received: from mail02.huawei.com (unknown [10.116.40.252]) by mail.maildlp.com (Postfix) with ESMTP id B75D41A07B6; Wed, 4 Sep 2024 22:17:10 +0800 (CST) Received: from ultra.huawei.com (unknown [10.90.53.71]) by APP3 (Coremail) with SMTP id _Ch0CgBnvIjfa9hmXCB4AQ--.21574S5; Wed, 04 Sep 2024 22:17:10 +0800 (CST) From: Pu Lehui To: bpf@vger.kernel.org, linux-riscv@lists.infradead.org, netdev@vger.kernel.org Cc: Andrii Nakryiko , Eduard Zingerman , Mykola Lysenko , =?utf-8?b?QmrDtnJuIFTDtnBlbA==?= , Puranjay Mohan , Alexei Starovoitov , Daniel Borkmann , Martin KaFai Lau , Song Liu , Yonghong Song , John Fastabend , KP Singh , Stanislav Fomichev , Hao Luo , Jiri Olsa , Palmer Dabbelt , Pu Lehui Subject: [PATCH bpf-next v2 03/10] selftests/bpf: Disable feature-llvm for vmtest Date: Wed, 4 Sep 2024 14:19:44 +0000 Message-Id: <20240904141951.1139090-4-pulehui@huaweicloud.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240904141951.1139090-1-pulehui@huaweicloud.com> References: <20240904141951.1139090-1-pulehui@huaweicloud.com> Precedence: bulk X-Mailing-List: bpf@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-CM-TRANSID: _Ch0CgBnvIjfa9hmXCB4AQ--.21574S5 X-Coremail-Antispam: 1UD129KBjvJXoW7Aw4UZFyxJr13uFyUJr4xWFg_yoW8ur43pa 18G34YkFySqF1YqF1xCrWUWFWrGw4qvFWrX3WIvr90vrnxJr97Xr1xtFWjqFyfW39Iqrs3 Aa4IgFyavF18Z37anT9S1TB71UUUUU7qnTZGkaVYY2UrUUUUjbIjqfuFe4nvWSU5nxnvy2 9KBjDU0xBIdaVrnRJUUUP2b4IE77IF4wAFF20E14v26rWj6s0DM7CY07I20VC2zVCF04k2 6cxKx2IYs7xG6rWj6s0DM7CIcVAFz4kK6r1j6r18M28IrcIa0xkI8VA2jI8067AKxVWUWw A2048vs2IY020Ec7CjxVAFwI0_Xr0E3s1l8cAvFVAK0II2c7xJM28CjxkF64kEwVA0rcxS w2x7M28EF7xvwVC0I7IYx2IY67AKxVW5JVW7JwA2z4x0Y4vE2Ix0cI8IcVCY1x0267AKxV W8Jr0_Cr1UM28EF7xvwVC2z280aVAFwI0_GcCE3s1l84ACjcxK6I8E87Iv6xkF7I0E14v2 6rxl6s0DM2AIxVAIcxkEcVAq07x20xvEncxIr21l5I8CrVACY4xI64kE6c02F40Ex7xfMc Ij6xIIjxv20xvE14v26r1j6r18McIj6I8E87Iv67AKxVWUJVW8JwAm72CE4IkC6x0Yz7v_ Jr0_Gr1lF7xvr2IYc2Ij64vIr41lFIxGxcIEc7CjxVA2Y2ka0xkIwI1lc7CjxVAaw2AFwI 0_GFv_Wryl42xK82IYc2Ij64vIr41l4I8I3I0E4IkC6x0Yz7v_Jr0_Gr1lx2IqxVAqx4xG 67AKxVWUJVWUGwC20s026x8GjcxK67AKxVWUGVWUWwC2zVAF1VAY17CE14v26r4a6rW5MI IYrxkI7VAKI48JMIIF0xvE2Ix0cI8IcVAFwI0_Jr0_JF4lIxAIcVC0I7IYx2IY6xkF7I0E 14v26F4j6r4UJwCI42IY6xAIw20EY4v20xvaj40_Jr0_JF4lIxAIcVC2z280aVAFwI0_Jr 0_Gr1lIxAIcVC2z280aVCY1x0267AKxVW8JVW8JrUvcSsGvfC2KfnxnUUI43ZEXa7IU04x RDUUUUU== X-CM-SenderInfo: psxovxtxl6x35dzhxuhorxvhhfrp/ X-Patchwork-Delegate: bpf@iogearbox.net From: Pu Lehui 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 --- 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