From patchwork Tue Jan 12 13:59:56 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jean-Philippe Brucker X-Patchwork-Id: 361206 Delivered-To: patch@linaro.org Received: by 2002:a02:ccad:0:0:0:0:0 with SMTP id t13csp390765jap; Tue, 12 Jan 2021 06:02:09 -0800 (PST) X-Google-Smtp-Source: ABdhPJwtvDaeYQ8ksbhqMl+qgeEX5BplRprLYGIjDwEEOgRc9UvLMjcChFIBlJdtRcbDojZ7tQWL X-Received: by 2002:aa7:c753:: with SMTP id c19mr3512173eds.358.1610460129217; Tue, 12 Jan 2021 06:02:09 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1610460129; cv=none; d=google.com; s=arc-20160816; b=ypnPUgu0rdLnYoI00gS6r7UctHd96Xy6/xmaZ3woab1EhWbYSSsQqVikbCfAzlMv3X 6SbddxGNyeYmLJ3dsVw2EjvJ0IHcKjZEBrNtKGScI6MjINibtHmMI74VbwDBSAdFVsg1 m41Vm7lFkx0iFLT1E25rKwv9dOglmTtmOifUyz6SX0OXe/pOeQQ4QKHqCRaxTjl97IVh dgpvZAclmqtBDbwGYrkFzKltUbntMF2J5E1iSwBIiavzlvy3vP6Oj7dobZK9nZbrarpV ZqU+QYWEx0IDqx1MAvZvAe2C3FEzWMFogY5Pfkngxitr/BazLxYsmMmJNlweXfuwwU+3 RU+A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=x/yfuTkYujlI5zpMD6cZk7TUtmg/ofIBluQ9SYa0d4k=; b=jk8RpGsiFuinoxvH9IVWdAjHCmjlw9kQJVO4jXTv7/VBEnEBDQ5xMc9yNmHICOUgkV Te0ZiFv6b9gK5GM2HnXnRqelcv4m6wK5/s7Vp9x6xpy5KBgPD32GtKWx/qKaCLTRIaQr VFTyYiDAKVa1/ZMLEYMFg1waiGlvaFY4jKccoY0C4E/58QaZ+PB+qw9H1iUSOU7JmBD6 WR5pQ+C7KDW9tnwKWCMe3SktBSa+0YMlvdu3/RMyQNNign6XR79AlEq7G4/0xrfHf7DP dUqHJvqAiBIiTkCeFunlRAfHQB7xDvfdd4RSQKZvjANrPaR22/FjuZfprpw7qigXtrDH Dfww== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Ob8lD9Bw; spf=pass (google.com: domain of linux-kselftest-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kselftest-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id y15si1398055edu.550.2021.01.12.06.02.09; Tue, 12 Jan 2021 06:02:09 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kselftest-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Ob8lD9Bw; spf=pass (google.com: domain of linux-kselftest-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kselftest-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726614AbhALOCI (ORCPT + 6 others); Tue, 12 Jan 2021 09:02:08 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59190 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730124AbhALOCI (ORCPT ); Tue, 12 Jan 2021 09:02:08 -0500 Received: from mail-ed1-x52b.google.com (mail-ed1-x52b.google.com [IPv6:2a00:1450:4864:20::52b]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 00010C061794 for ; Tue, 12 Jan 2021 06:01:27 -0800 (PST) Received: by mail-ed1-x52b.google.com with SMTP id by27so2185472edb.10 for ; Tue, 12 Jan 2021 06:01:27 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=x/yfuTkYujlI5zpMD6cZk7TUtmg/ofIBluQ9SYa0d4k=; b=Ob8lD9BwLkwk1Fwhio5z/w8szq2k9AeOJA2jTM9y549QSdSjGAMYhOREIggKoFq5H5 WnSptKhIuj+B/8236Wla9mZ55kuHovqGFJoxvZ69F6EYq54plqSQUC1u5ylM2tFmb6LQ sKtuCFRD7H8YABeo6aVuF43lYj5IU9S3bkiLwFw/Js0hupTDnF7edWIq3Ro5les+MXpo h6/IbfIIyP4Y5g9qeiNTVFUxgSfXMl5BHmQ8PYRh3zxOYAYtGnpebofb2PlYprQmTLI1 xJV31xaUjZbgw41U52eCpWFHXKpoxoDhOYWKorZ54q8R2+Qgq9m9qOqQ34aM5fHQXukE 6CAQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=x/yfuTkYujlI5zpMD6cZk7TUtmg/ofIBluQ9SYa0d4k=; b=P2/KizM8z0Hv26Tqdz1wQ9k61KJxP2NgvYONbHZAolgnfG82ER0zz28MPAMMi8KReO vm+y6toRCD++JBTo25JfUiIVIg7a1etFaisBAtyxzVBYbJnhO9++63+y/E8bcp3ZSkej maeu3cbEZkMU+Z4EyCXf3wZd+kOxt4beKBiDBh91mjTB9rk5e0ExG1FeNPso6NtwcNGJ Zt5ySGbbjv3aG9gVfnXmXbMoqDfwaAsP/2BcSYetDl8zHo3c9c/u0bxU0KGh6qqBiBAy QIGkeRJJh9SKFpwQ0FwtPstszeRMYFLcIGpPqrq/m9SX1HzpMFnGbWiYAf4qyXi7Gikk 3M3g== X-Gm-Message-State: AOAM530qiXNhRA7PD+6g2yqLJQtMHPGoBE6yfxhfo3HoZbaIEptAzwZj dwAN/GexydEuDOh2k27iUVb90Q== X-Received: by 2002:aa7:c5d6:: with SMTP id h22mr3466670eds.82.1610460086628; Tue, 12 Jan 2021 06:01:26 -0800 (PST) Received: from localhost.localdomain ([2001:1715:4e26:a7e0:116c:c27a:3e7f:5eaf]) by smtp.gmail.com with ESMTPSA id t19sm1227846ejc.62.2021.01.12.06.01.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 12 Jan 2021 06:01:26 -0800 (PST) From: Jean-Philippe Brucker To: bpf@vger.kernel.org Cc: shuah@kernel.org, ast@kernel.org, daniel@iogearbox.net, andrii@kernel.org, kafai@fb.com, songliubraving@fb.com, yhs@fb.com, john.fastabend@gmail.com, kpsingh@kernel.org, linux-kselftest@vger.kernel.org, Jean-Philippe Brucker Subject: [PATCH bpf-next 1/5] selftests/bpf: Enable cross-building Date: Tue, 12 Jan 2021 14:59:56 +0100 Message-Id: <20210112135959.649075-2-jean-philippe@linaro.org> X-Mailer: git-send-email 2.30.0 In-Reply-To: <20210112135959.649075-1-jean-philippe@linaro.org> References: <20210112135959.649075-1-jean-philippe@linaro.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-kselftest@vger.kernel.org Build bpftool and resolve_btfids using the host toolchain when cross-compiling, since they are executed during build to generate the selftests. Add a host build directory in order to build both host and target version of libbpf. Build host tools using $(HOSTCC) defined in Makefile.include. Signed-off-by: Jean-Philippe Brucker --- tools/testing/selftests/bpf/Makefile | 43 ++++++++++++++++++++++------ 1 file changed, 34 insertions(+), 9 deletions(-) -- 2.30.0 Acked-by: Andrii Nakryiko diff --git a/tools/testing/selftests/bpf/Makefile b/tools/testing/selftests/bpf/Makefile index c51df6b91bef..1d85565883ea 100644 --- a/tools/testing/selftests/bpf/Makefile +++ b/tools/testing/selftests/bpf/Makefile @@ -1,6 +1,7 @@ # SPDX-License-Identifier: GPL-2.0 include ../../../../scripts/Kbuild.include include ../../../scripts/Makefile.arch +include ../../../scripts/Makefile.include CXX ?= $(CROSS_COMPILE)g++ @@ -113,7 +114,20 @@ SCRATCH_DIR := $(OUTPUT)/tools BUILD_DIR := $(SCRATCH_DIR)/build INCLUDE_DIR := $(SCRATCH_DIR)/include BPFOBJ := $(BUILD_DIR)/libbpf/libbpf.a -RESOLVE_BTFIDS := $(BUILD_DIR)/resolve_btfids/resolve_btfids +ifneq ($(CROSS_COMPILE),) +HOST_BUILD_DIR := $(BUILD_DIR)/host +HOST_SCRATCH_DIR := $(OUTPUT)/host-tools +else +HOST_BUILD_DIR := $(BUILD_DIR) +HOST_SCRATCH_DIR := $(SCRATCH_DIR) +endif +HOST_BPFOBJ := $(HOST_BUILD_DIR)/libbpf/libbpf.a +RESOLVE_BTFIDS := $(HOST_BUILD_DIR)/resolve_btfids/resolve_btfids + +# sort removes libbpf duplicates when not cross-building +MAKE_DIRS := $(sort $(BUILD_DIR)/libbpf $(HOST_BUILD_DIR)/libbpf \ + $(HOST_BUILD_DIR)/bpftool $(HOST_BUILD_DIR)/resolve_btfids \ + $(INCLUDE_DIR)) VMLINUX_BTF_PATHS ?= $(if $(O),$(O)/vmlinux) \ $(if $(KBUILD_OUTPUT),$(KBUILD_OUTPUT)/vmlinux) \ @@ -157,7 +171,7 @@ $(OUTPUT)/test_stub.o: test_stub.c $(BPFOBJ) $(call msg,CC,,$@) $(Q)$(CC) -c $(CFLAGS) -o $@ $< -DEFAULT_BPFTOOL := $(SCRATCH_DIR)/sbin/bpftool +DEFAULT_BPFTOOL := $(HOST_SCRATCH_DIR)/sbin/bpftool $(OUTPUT)/runqslower: $(BPFOBJ) | $(DEFAULT_BPFTOOL) $(Q)$(MAKE) $(submake_extras) -C $(TOOLSDIR)/bpf/runqslower \ @@ -182,10 +196,11 @@ $(OUTPUT)/test_sysctl: cgroup_helpers.c BPFTOOL ?= $(DEFAULT_BPFTOOL) $(DEFAULT_BPFTOOL): $(wildcard $(BPFTOOLDIR)/*.[ch] $(BPFTOOLDIR)/Makefile) \ - $(BPFOBJ) | $(BUILD_DIR)/bpftool + $(HOST_BPFOBJ) | $(HOST_BUILD_DIR)/bpftool $(Q)$(MAKE) $(submake_extras) -C $(BPFTOOLDIR) \ - OUTPUT=$(BUILD_DIR)/bpftool/ \ - prefix= DESTDIR=$(SCRATCH_DIR)/ install + CC=$(HOSTCC) LD=$(HOSTLD) \ + OUTPUT=$(HOST_BUILD_DIR)/bpftool/ \ + prefix= DESTDIR=$(HOST_SCRATCH_DIR)/ install $(Q)mkdir -p $(BUILD_DIR)/bpftool/Documentation $(Q)RST2MAN_OPTS="--exit-status=1" $(MAKE) $(submake_extras) \ -C $(BPFTOOLDIR)/Documentation \ @@ -198,7 +213,16 @@ $(BPFOBJ): $(wildcard $(BPFDIR)/*.[ch] $(BPFDIR)/Makefile) \ $(Q)$(MAKE) $(submake_extras) -C $(BPFDIR) OUTPUT=$(BUILD_DIR)/libbpf/ \ DESTDIR=$(SCRATCH_DIR) prefix= all install_headers -$(BUILD_DIR)/libbpf $(BUILD_DIR)/bpftool $(BUILD_DIR)/resolve_btfids $(INCLUDE_DIR): +ifneq ($(BPFOBJ),$(HOST_BPFOBJ)) +$(HOST_BPFOBJ): $(wildcard $(BPFDIR)/*.[ch] $(BPFDIR)/Makefile) \ + ../../../include/uapi/linux/bpf.h \ + | $(INCLUDE_DIR) $(HOST_BUILD_DIR)/libbpf + $(Q)$(MAKE) $(submake_extras) -C $(BPFDIR) \ + OUTPUT=$(HOST_BUILD_DIR)/libbpf/ CC=$(HOSTCC) LD=$(HOSTLD) \ + DESTDIR=$(HOST_SCRATCH_DIR)/ prefix= all install_headers +endif + +$(MAKE_DIRS): $(call msg,MKDIR,,$@) $(Q)mkdir -p $@ @@ -211,7 +235,7 @@ else $(Q)cp "$(VMLINUX_H)" $@ endif -$(RESOLVE_BTFIDS): $(BPFOBJ) | $(BUILD_DIR)/resolve_btfids \ +$(RESOLVE_BTFIDS): $(HOST_BPFOBJ) | $(HOST_BUILD_DIR)/resolve_btfids \ $(TOOLSDIR)/bpf/resolve_btfids/main.c \ $(TOOLSDIR)/lib/rbtree.c \ $(TOOLSDIR)/lib/zalloc.c \ @@ -219,7 +243,8 @@ $(RESOLVE_BTFIDS): $(BPFOBJ) | $(BUILD_DIR)/resolve_btfids \ $(TOOLSDIR)/lib/ctype.c \ $(TOOLSDIR)/lib/str_error_r.c $(Q)$(MAKE) $(submake_extras) -C $(TOOLSDIR)/bpf/resolve_btfids \ - OUTPUT=$(BUILD_DIR)/resolve_btfids/ BPFOBJ=$(BPFOBJ) + CC=$(HOSTCC) LD=$(HOSTLD) AR=$(HOSTAR) \ + OUTPUT=$(HOST_BUILD_DIR)/resolve_btfids/ BPFOBJ=$(HOST_BPFOBJ) # Get Clang's default includes on this system, as opposed to those seen by # '-target bpf'. This fixes "missing" files on some architectures/distros, @@ -450,7 +475,7 @@ $(OUTPUT)/bench: $(OUTPUT)/bench.o $(OUTPUT)/testing_helpers.o \ $(call msg,BINARY,,$@) $(Q)$(CC) $(LDFLAGS) -o $@ $(filter %.a %.o,$^) $(LDLIBS) -EXTRA_CLEAN := $(TEST_CUSTOM_PROGS) $(SCRATCH_DIR) \ +EXTRA_CLEAN := $(TEST_CUSTOM_PROGS) $(SCRATCH_DIR) $(HOST_SCRATCH_DIR) \ prog_tests/tests.h map_tests/tests.h verifier/tests.h \ feature \ $(addprefix $(OUTPUT)/,*.o *.skel.h no_alu32 bpf_gcc bpf_testmod.ko) From patchwork Tue Jan 12 13:59:57 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jean-Philippe Brucker X-Patchwork-Id: 361207 Delivered-To: patch@linaro.org Received: by 2002:a02:ccad:0:0:0:0:0 with SMTP id t13csp392289jap; Tue, 12 Jan 2021 06:03:31 -0800 (PST) X-Google-Smtp-Source: ABdhPJxDF3dmEMr75Tte2rlQ4lmEuy9fPuSTqkJcNi4UDuNFLurT75CRb1VTtCgwreg45Al/Tdxa X-Received: by 2002:a17:906:2984:: with SMTP id x4mr3380906eje.239.1610460211526; Tue, 12 Jan 2021 06:03:31 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1610460211; cv=none; d=google.com; s=arc-20160816; b=zHOYy2iATwgi93FDtd8Azr4B0L6gcV0mqo0UyMzexzpUKEzxACiyKB3lM+ZQcUkN7E jNlptLFmPwrG86vZCXk1W+rECiYDlLCH8IQgEPKYd6dBOk+iHDe7qT1YGTHidCNrvyzc b6MmwvNWu5lFfoRitBIXDlPZ5VD0fa9IsXzwIQMbs1aTNswnVp1J1FFXGv8ThGcmfGyC 74TdJJpPklyAtSNYLv+E0IWDAHjzKEOxrvDCgSjXh94LMYoFd+b3VlQEHZWAs1V2oCgU M0S798rlwZyOM2CUqHpyZnMM5uJNq40GABrcrDvPsW++IuvbUvpdGbBgo8Xzytt9QdWg UlNg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=hpCVH5a6hvC4+S6dhiP+hhLVa4IrOyo2QyAihLIZoi8=; b=LXonvOZFSksdqZPM3+2Ce/8nQoQY9SDhzZR0k2+yKphej6L6WgLfH9ln4QT+xiRJbQ EYjzxiyjsmGaOvhoVmuXb5CGh3/JgWo+OqFG7uWvpGlrdRBzN9cRqVJqWiH/ZifyVgPW TPtXRgerqsyGIC1fSrE5y33ooNUt3hjQFupwAqrW1lrFfrPdSvUB4XKHSOGa7JZRSK+J 0iuaQbCUN+hJnH5k42SfJsS7kN15lp+nHHL9u8oq8R9bf+t9bYV7LEDvCHMKmDCFlyKh mrWdOTj6dkdrSlEsIVc0A9DZAVefjdBZA/nnTLMK2EadMLoA3qfCY0s5SBkPS7m2OLev 3daA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=ZmOPNrpi; spf=pass (google.com: domain of linux-kselftest-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kselftest-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id e16si1120735eja.462.2021.01.12.06.03.31; Tue, 12 Jan 2021 06:03:31 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kselftest-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=ZmOPNrpi; spf=pass (google.com: domain of linux-kselftest-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kselftest-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732161AbhALOCJ (ORCPT + 6 others); Tue, 12 Jan 2021 09:02:09 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59196 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731388AbhALOCJ (ORCPT ); Tue, 12 Jan 2021 09:02:09 -0500 Received: from mail-ej1-x636.google.com (mail-ej1-x636.google.com [IPv6:2a00:1450:4864:20::636]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id EB21DC06179F for ; Tue, 12 Jan 2021 06:01:28 -0800 (PST) Received: by mail-ej1-x636.google.com with SMTP id jx16so3625933ejb.10 for ; Tue, 12 Jan 2021 06:01:28 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=hpCVH5a6hvC4+S6dhiP+hhLVa4IrOyo2QyAihLIZoi8=; b=ZmOPNrpiH+mVTmTRz5FUC9VHUzKtgI31M0T9yLPHWEPJdDbLm9SvxRbXYVtn6t5zII jpxQU/YaeO2kNXl/wOGTxhTQraBdVFBl4boy+F+TtKZ/pcFzY0Ku4u9b3fCbL4NAcLzQ WKI0zb4eq0QH4+6LfXcx3ohR73VyEWu/cZnyOO1GMIU9d7IM1wm1vTcbCiQrHKSL44zE BGiov228ESMdD93HKT1Gwt+Pm2YOHK4luUDyDNxgie4VwCxz3IqxyZLIZLRR85RsWNll SzdDiYVDZz0F8TUQfUEFA/npi/OMY3EK8hM1mCnBmvfMwJCQDAVc+oA/UKWS1uj5SAeM M0WA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=hpCVH5a6hvC4+S6dhiP+hhLVa4IrOyo2QyAihLIZoi8=; b=XUFmT5tHb6gCmadmoPi46s0KnywMWaSn/wqhU+J99zaoC5QoMionGX73wPwLdifJkw uQCvcWTc0uJB9EjATqI3/PPF9o4oCBnHzgjIvEQDM/M26HM0Hsw2bTjNoV1HiNqi2E8J dfg93bn0eaCPRZUF3e4o8wKQg7L6mHK4or7Sas68IzT98N8jUaoF63l7DHNIMZybJJHa kefK105oCUF3Xwbcft7T9IBHSvfDaTz/CFo1jjx+3/RjbEmtrfPZRnMf6IBaH7hkLikV k8i4VDh79ou0a/Rp29MS5SkU846PvsBeh0qTg0uOh5JmdMaKfH642ZPdDeDzs2L56X8r LJvw== X-Gm-Message-State: AOAM532DPU1XXdBzLUDK25pvzLOws4EHZY9DL+metFLDwyPlHt5rFblU 1NLBVxCQqL7wCTpkL/r/v+HnfQ== X-Received: by 2002:a17:906:440e:: with SMTP id x14mr3310201ejo.77.1610460087614; Tue, 12 Jan 2021 06:01:27 -0800 (PST) Received: from localhost.localdomain ([2001:1715:4e26:a7e0:116c:c27a:3e7f:5eaf]) by smtp.gmail.com with ESMTPSA id t19sm1227846ejc.62.2021.01.12.06.01.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 12 Jan 2021 06:01:27 -0800 (PST) From: Jean-Philippe Brucker To: bpf@vger.kernel.org Cc: shuah@kernel.org, ast@kernel.org, daniel@iogearbox.net, andrii@kernel.org, kafai@fb.com, songliubraving@fb.com, yhs@fb.com, john.fastabend@gmail.com, kpsingh@kernel.org, linux-kselftest@vger.kernel.org, Jean-Philippe Brucker Subject: [PATCH bpf-next 2/5] selftests/bpf: Fix out-of-tree build Date: Tue, 12 Jan 2021 14:59:57 +0100 Message-Id: <20210112135959.649075-3-jean-philippe@linaro.org> X-Mailer: git-send-email 2.30.0 In-Reply-To: <20210112135959.649075-1-jean-philippe@linaro.org> References: <20210112135959.649075-1-jean-philippe@linaro.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-kselftest@vger.kernel.org When building out-of-tree, the .skel.h files are generated into the $(OUTPUT) directory, rather than $(CURDIR). Add $(OUTPUT) to the include paths. Signed-off-by: Jean-Philippe Brucker --- tools/testing/selftests/bpf/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- 2.30.0 Acked-by: Andrii Nakryiko diff --git a/tools/testing/selftests/bpf/Makefile b/tools/testing/selftests/bpf/Makefile index 1d85565883ea..3ff7e79cc497 100644 --- a/tools/testing/selftests/bpf/Makefile +++ b/tools/testing/selftests/bpf/Makefile @@ -25,7 +25,7 @@ BPF_GCC ?= $(shell command -v bpf-gcc;) SAN_CFLAGS ?= CFLAGS += -g -rdynamic -Wall -O2 $(GENFLAGS) $(SAN_CFLAGS) \ -I$(CURDIR) -I$(INCLUDE_DIR) -I$(GENDIR) -I$(LIBDIR) \ - -I$(TOOLSINCDIR) -I$(APIDIR) \ + -I$(TOOLSINCDIR) -I$(APIDIR) -I$(OUTPUT) \ -Dbpf_prog_load=bpf_prog_test_load \ -Dbpf_load_program=bpf_test_load_program LDLIBS += -lcap -lelf -lz -lrt -lpthread From patchwork Tue Jan 12 13:59:58 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jean-Philippe Brucker X-Patchwork-Id: 361208 Delivered-To: patch@linaro.org Received: by 2002:a02:ccad:0:0:0:0:0 with SMTP id t13csp392295jap; Tue, 12 Jan 2021 06:03:32 -0800 (PST) X-Google-Smtp-Source: ABdhPJzGnmM5jwJBGehXrWXg9MqfgDPseKq07kkcGBP67DeYrCpJncdNnJ8r8m9n0MQlkPBGi3CV X-Received: by 2002:a50:8744:: with SMTP id 4mr3504125edv.362.1610460211891; Tue, 12 Jan 2021 06:03:31 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1610460211; cv=none; d=google.com; s=arc-20160816; b=tNXzOiXmSPOg+xPM+BJ+8+BwOxWCa6a/Ich8UqyA9AYzQg/Bx0a7+sBrtWHZMiOSrN i6KvNsbbixtg5zpsXdbSZQHFoPrjkJWAziscjvJrO3fnctbpBJzjUzBKfSrxieemRaoK Cj8hs05RJxlKOOBPLBwkuhUBqVpx4ozFMH1i1bygq7x9GTmMRkQr/CrpTWsRKMGfcFMd ACojyf8qMhmJQ8+iFl+IHPRr8rtbxdjbaNWD9KXHXGzc4AGwokToXafKwkOB/eM2971g Xqu+E6qPLKvmLjaEhspZOiM0vLI7A5zkGEObCNhyTKEEPAsiDFGtECm+enJQ9RP4Va7a JnWw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=dVnHIa5MKIrkM7yQ7+elQ2gqys62rHElWs015noXyHE=; b=uM6hOw1h/2dGLFndqUZ3s08eG6MhOh0JGYi4+d/G4My+/QYNa41g+l20zrdfCH28d7 sIwOunaWgKBeS6ViktvEziKkNFoPg+uuSBngKqDpT5gndbH6zOqG8dONUCBpuMvRWrLx IpnLFBCNEFjUlTpiSALetBU0z10MOrPn4wlFzeo5cuzA2sKNlAVOIIdmwGBxzt35OPNI 8X+Ze6IqUsHU7NpcNWwP3w9sqtZak7zH/puD4Dllhtl1Eqof8u4bts5lgCiPnXdMk8Na fxlCKmrtoogJWQDVbtqKEJAIj27wwjXjA091vzBk4GNejr/ahR6Za8nTg3TY2AyVyI6d ELyg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=DF5ZMmdb; spf=pass (google.com: domain of linux-kselftest-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kselftest-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id e16si1120735eja.462.2021.01.12.06.03.31; Tue, 12 Jan 2021 06:03:31 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kselftest-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=DF5ZMmdb; spf=pass (google.com: domain of linux-kselftest-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kselftest-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727331AbhALOCr (ORCPT + 6 others); Tue, 12 Jan 2021 09:02:47 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59332 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727552AbhALOCr (ORCPT ); Tue, 12 Jan 2021 09:02:47 -0500 Received: from mail-ej1-x62d.google.com (mail-ej1-x62d.google.com [IPv6:2a00:1450:4864:20::62d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5F6BBC0617A3 for ; Tue, 12 Jan 2021 06:01:30 -0800 (PST) Received: by mail-ej1-x62d.google.com with SMTP id e18so2204820ejt.12 for ; Tue, 12 Jan 2021 06:01:30 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=dVnHIa5MKIrkM7yQ7+elQ2gqys62rHElWs015noXyHE=; b=DF5ZMmdb3jZoY4pEbqX1uelmAk7NcR3nJR6yDml7uEpzoztdllkzC7j+8pUkL8yjSz JyTOXA0W80PauKvsFCV6KfkGAhFccPQ5eQbjAUo9oA1R3Er0VQNTYq8Av2fQBNxdts8G Y1GB7O6jsiM8fOk3T1RegNNQ+lfEhqbe5XZLKjPGW6+goc4C0TzOyjDJEQT+4GHji/fv kM0QaAvJO6mi70+zYycP+Xe42QZeYHUXNJQbcIxBVoILMYdAMLkYFJz34yCpjAGAbnM0 JOz0Z7rHwQuvCN7hHlYx8xarA3QnEGzVrKdVmFC0myaz0cCVFL4wKxCKqwLxtV+GdNRn 8ftQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=dVnHIa5MKIrkM7yQ7+elQ2gqys62rHElWs015noXyHE=; b=ZwAQ6H3R8btcQgCplMcEvap2Z8kATNf5U8naJn07AkwaKYJcJ+MDR3CuXY/j02VPgf L/SZA7ve88Sv0a+0DEHTZDiqd/jltPMEbkWdwUKqH7y6j6/7u8iuRhYwjfxeAKRpby48 qCdBCxQIzlpRY3fILs0uHLcTunc6CdLDLDCmNTDBq0/YpviJisOoGDKQ3DMvCkLPJEp8 nG3YiGaiIqJolV+rU+DxdQnq4aRMJXnFSHe1eGMny21KQ0H1L203aWXDkhLlgEG2mp+E UJGROmfhnnl4Mak1hDnViCsC4TU3FnD+FJnQWGJbbWaKl2a1ioSFSEFCRyQ3O73qNoAw 4Axw== X-Gm-Message-State: AOAM5339nVopHIf9qiws/zuMdKN2ZCUL3HFYWQtRZFu0C9hspgA1VA1k xrOTIBGZxOmgx+Sn+MSmwxX7/Q== X-Received: by 2002:a17:906:f85:: with SMTP id q5mr3358548ejj.105.1610460089144; Tue, 12 Jan 2021 06:01:29 -0800 (PST) Received: from localhost.localdomain ([2001:1715:4e26:a7e0:116c:c27a:3e7f:5eaf]) by smtp.gmail.com with ESMTPSA id t19sm1227846ejc.62.2021.01.12.06.01.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 12 Jan 2021 06:01:28 -0800 (PST) From: Jean-Philippe Brucker To: bpf@vger.kernel.org Cc: shuah@kernel.org, ast@kernel.org, daniel@iogearbox.net, andrii@kernel.org, kafai@fb.com, songliubraving@fb.com, yhs@fb.com, john.fastabend@gmail.com, kpsingh@kernel.org, linux-kselftest@vger.kernel.org, Jean-Philippe Brucker Subject: [PATCH bpf-next 3/5] selftests/bpf: Move generated test files to $(TEST_GEN_FILES) Date: Tue, 12 Jan 2021 14:59:58 +0100 Message-Id: <20210112135959.649075-4-jean-philippe@linaro.org> X-Mailer: git-send-email 2.30.0 In-Reply-To: <20210112135959.649075-1-jean-philippe@linaro.org> References: <20210112135959.649075-1-jean-philippe@linaro.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-kselftest@vger.kernel.org During an out-of-tree build, attempting to install the $(TEST_FILES) into the $(OUTPUT) directory fails, because the objects were already generated into $(OUTPUT): rsync: [sender] link_stat "tools/testing/selftests/bpf/test_lwt_ip_encap.o" failed: No such file or directory (2) rsync: [sender] link_stat "tools/testing/selftests/bpf/test_tc_edt.o" failed: No such file or directory (2) Use $(TEST_GEN_FILES) instead. Signed-off-by: Jean-Philippe Brucker --- tools/testing/selftests/bpf/Makefile | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) -- 2.30.0 diff --git a/tools/testing/selftests/bpf/Makefile b/tools/testing/selftests/bpf/Makefile index 3ff7e79cc497..046848c508d1 100644 --- a/tools/testing/selftests/bpf/Makefile +++ b/tools/testing/selftests/bpf/Makefile @@ -44,10 +44,9 @@ ifneq ($(BPF_GCC),) TEST_GEN_PROGS += test_progs-bpf_gcc endif -TEST_GEN_FILES = -TEST_FILES = test_lwt_ip_encap.o \ - test_tc_edt.o \ - xsk_prereqs.sh +TEST_GEN_FILES = test_lwt_ip_encap.o \ + test_tc_edt.o +TEST_FILES = xsk_prereqs.sh # Order correspond to 'make run_tests' order TEST_PROGS := test_kmod.sh \ From patchwork Tue Jan 12 13:59:59 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jean-Philippe Brucker X-Patchwork-Id: 361210 Delivered-To: patch@linaro.org Received: by 2002:a17:906:fb05:0:0:0:0 with SMTP id lz5csp253267ejb; Tue, 12 Jan 2021 06:05:45 -0800 (PST) X-Google-Smtp-Source: ABdhPJz9sXLR80gUucdxRY181mnFC16pODQROQufRyMQ7i4BX0DX11xJ4mnFKOBS2KHWVFODLMHM X-Received: by 2002:a17:906:7146:: with SMTP id z6mr3294172ejj.379.1610460214565; Tue, 12 Jan 2021 06:03:34 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1610460214; cv=none; d=google.com; s=arc-20160816; b=T8d/RHs17NmuSksD4oJkTf9YihckeRYgJZLVW5g8NDBOWuLBABdCXI1JDyidyrSsUw fCm+bGdrDhQpiJE4oRUuprZAIf7194FODyfuALMuweKArMRmzQguZbJln4dRi8yp7k6x yCgkMAH1fSd8iVfe0U8lDZe6v9PFTK7VTUbEzVLDiDFSVe3yPN4YJVODaV5GGf51QkaY +bQrRaLMF+0fZ7iwt+fQ/UuV+Ax5P0MVUfnl3A1AKu6FLHbHNgM9/B1cQw1Kld3epe4P MQLh/evKJk3kHnN0GtX/8KzCNJOuxu747hAcopLNJpQng5JkF7Xhgm/ubraiP9zEczhD cA0g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=x0YUj1+zjl+/xGU2slFlAP8CkLypp1CdWTvlwp1GroY=; b=nmsFJxjpLwBp+5ZEVKCTDc1YPbf3JDe73mVFKyJQOqGN7KtS/0bikALNRJpKHcs+7W gdkEdcOKmoDlvJ89Tx3i82QdNUMl35AyQHKQ4X92jetDzgOeSLFqbvLhSzU8Lxc/zTER x9gufReWt9W/hA77Ipj/mBJIAF3SFVjCfYMMbFNkS9V/Tvx5ownVu5tC8jP8Sc3X91RH P0T4/ho2KQUywLlUQQv/zG4iTXOzSjMdUPASQA891jUmNpSM3v34jrOMJYpT6q9Bnw0v X6NJYviPLFbmIxz2B6rJszbNDWUlyT6nBoWbABiW5Vt0AcN+K73dYJLNj4qaP0NAVgoz Lu2Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="I/9wyV1A"; spf=pass (google.com: domain of linux-kselftest-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kselftest-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id e16si1120735eja.462.2021.01.12.06.03.34; Tue, 12 Jan 2021 06:03:34 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kselftest-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="I/9wyV1A"; spf=pass (google.com: domain of linux-kselftest-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kselftest-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728605AbhALOCy (ORCPT + 6 others); Tue, 12 Jan 2021 09:02:54 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59340 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728327AbhALOCx (ORCPT ); Tue, 12 Jan 2021 09:02:53 -0500 Received: from mail-ed1-x52a.google.com (mail-ed1-x52a.google.com [IPv6:2a00:1450:4864:20::52a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 72B4CC0617A5 for ; Tue, 12 Jan 2021 06:01:31 -0800 (PST) Received: by mail-ed1-x52a.google.com with SMTP id h16so2409337edt.7 for ; Tue, 12 Jan 2021 06:01:31 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=x0YUj1+zjl+/xGU2slFlAP8CkLypp1CdWTvlwp1GroY=; b=I/9wyV1A3JsKrGZjPBsUfMhP4rl+e+p0AXnUvthIkVW5rIGUCd3nER7MS38cM9xtEa oJ7N098+ITPAOTtOn/9A6l05RZVXGMmFdt3QLjvfCDxiOXLIvZaa/0gPBtP1tV84W3Bz sce1BPEb2sYrwMR83wNMRX4wZLZ9GdB8ztujvwg6PL83v9t8sV/XNHlC5F84IssFds7o XNL7uFWPVjnGo8fJhTy/yk+qscito/aEXYyJGTMUo3q+WScfg35YJ0ZiBmKhd9+J81mp emob1lSxntMDSRHQ7c8Ec96ZIMv0H9GCV1AeULAdTaBG/rao6r6bpEEhCVub3+Z2sgGM 076Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=x0YUj1+zjl+/xGU2slFlAP8CkLypp1CdWTvlwp1GroY=; b=JppKyHhJlZRW/Eg7d7Z/PL6U9AYmTeiA4GXmvur46rSLlGYQy/XuohrVjTfgW8Za2c 2OrO6Jx6pR59EtSG0QCyfA87UJfuLtjk/v39leNo0xjVw1U8GArdjPKRzx+ILm9HYzkd mGC5qrluk7Pnn+DKezypsL0Ys3NJ1Ff+rAR85qYy65r3oa0g23v53+36l/6sZEiYFcqH J4HBYLJQwdGnL44KtQUXtczdecACXJRc+6GE6JtxwItnGbP6Oe8hOi9dzuN8ntq3PsE/ N1B2BfPyrwQcY+3AZmZazoXnZV/3IsivqgwMPr3OZGl6aUarEEmape/4bjYWqbtZZQYt WyEA== X-Gm-Message-State: AOAM530NmM23I44R6fQ6XaYrT5EKl259ywM9kclV0YE0hg/RsCeQnhSs j9z6Sham3NoWOIKoUqPuuk/vhg== X-Received: by 2002:aa7:c253:: with SMTP id y19mr3471449edo.179.1610460090237; Tue, 12 Jan 2021 06:01:30 -0800 (PST) Received: from localhost.localdomain ([2001:1715:4e26:a7e0:116c:c27a:3e7f:5eaf]) by smtp.gmail.com with ESMTPSA id t19sm1227846ejc.62.2021.01.12.06.01.29 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 12 Jan 2021 06:01:29 -0800 (PST) From: Jean-Philippe Brucker To: bpf@vger.kernel.org Cc: shuah@kernel.org, ast@kernel.org, daniel@iogearbox.net, andrii@kernel.org, kafai@fb.com, songliubraving@fb.com, yhs@fb.com, john.fastabend@gmail.com, kpsingh@kernel.org, linux-kselftest@vger.kernel.org, Jean-Philippe Brucker Subject: [PATCH bpf-next 4/5] selftests/bpf: Fix installation of urandom_read Date: Tue, 12 Jan 2021 14:59:59 +0100 Message-Id: <20210112135959.649075-5-jean-philippe@linaro.org> X-Mailer: git-send-email 2.30.0 In-Reply-To: <20210112135959.649075-1-jean-philippe@linaro.org> References: <20210112135959.649075-1-jean-philippe@linaro.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-kselftest@vger.kernel.org For out-of-tree builds, $(TEST_CUSTOM_PROGS) require the $(OUTPUT) prefix, otherwise the kselftest lib doesn't know how to install them: rsync: [sender] link_stat "tools/testing/selftests/bpf/urandom_read" failed: No such file or directory (2) Signed-off-by: Jean-Philippe Brucker --- tools/testing/selftests/bpf/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- 2.30.0 Acked-by: Andrii Nakryiko diff --git a/tools/testing/selftests/bpf/Makefile b/tools/testing/selftests/bpf/Makefile index 046848c508d1..bffb4ad59a3d 100644 --- a/tools/testing/selftests/bpf/Makefile +++ b/tools/testing/selftests/bpf/Makefile @@ -82,7 +82,7 @@ TEST_GEN_PROGS_EXTENDED = test_sock_addr test_skb_cgroup_id_user \ test_lirc_mode2_user xdping test_cpp runqslower bench bpf_testmod.ko \ xdpxceiver -TEST_CUSTOM_PROGS = urandom_read +TEST_CUSTOM_PROGS = $(OUTPUT)/urandom_read # Emit succinct information message describing current building step # $1 - generic step name (e.g., CC, LINK, etc); From patchwork Tue Jan 12 14:00:00 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jean-Philippe Brucker X-Patchwork-Id: 361209 Delivered-To: patch@linaro.org Received: by 2002:a02:ccad:0:0:0:0:0 with SMTP id t13csp392303jap; Tue, 12 Jan 2021 06:03:32 -0800 (PST) X-Google-Smtp-Source: ABdhPJweHtdC1WJ09VQG+5aO7QYcexak5hrWO55+8LDsJFZG3jyQm3i6wJp211nftpEZVP8kGieu X-Received: by 2002:aa7:c849:: with SMTP id g9mr3529357edt.48.1610460212320; Tue, 12 Jan 2021 06:03:32 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1610460212; cv=none; d=google.com; s=arc-20160816; b=Ke2DemrLjoia9KqA6M6Qxh/tf+Iw3aYIOPZ4jX/U3P/NWDlIWu+vxGUgE296iLu2KA kgtYqUWTD8XyoNXh/csfQCwldlqjYtUAPXV+3Ad5VUYKhMTblGFA799Zb1oXEFq5exjT iUmc8MvHmJmGKumY9IJFk68kLF7yWS4j8LasqjFKkuzVVWWn6hcCWPX/jlo54nrIcy7o McvgMDNpCnXWgYjeIxkr9P2yFoUzLxEgqUK7jy3555tSKSvJyzvaZmR8st9LHWalKzM7 KMBYgW1Wp0gtGXEKjk7UJiDL8UHlEaQblfbxA0p9uQOMSfB0RGpc88cYY8HlFPP4rzzt LRNA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=zvv6LYFe9mpH/hRqRunavAEnNPwum4yHEeubUaepqPU=; b=Rh4Gdq7Lw/US59tB3HXjZZ5zMRjSdPpLRvp9Rkyj06+ursWao5b0sjqOtTn46TGPyv DwGu6+UxI6oehrNPU3osjSGUALzb00RGonK92HoUVUUhodz7jftIkZ43Nf7cMtJXJWWi AcL1ACXG8z5sYLwFE1J/eNIzg30KfG+FPhH9UaB0SwVvWKboJBat37SRlpsp8MT4ig2o pV5LD2XbwJVtJkeOGlM17xAVf8T11gY/V/z6xicHvXSDpqU3LkA4qSmkpmRSbhl6+hLN sSjWZ0oOYNGU6chm6TA3OO/lUQr+8Buo2kS5UcnnmjfQeXDSCqCmQ9VaYOnhsGtVME1e iT1g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=fn2ddKJC; spf=pass (google.com: domain of linux-kselftest-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kselftest-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id e16si1120735eja.462.2021.01.12.06.03.32; Tue, 12 Jan 2021 06:03:32 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kselftest-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=fn2ddKJC; spf=pass (google.com: domain of linux-kselftest-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kselftest-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728876AbhALOCt (ORCPT + 6 others); Tue, 12 Jan 2021 09:02:49 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59346 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728021AbhALOCs (ORCPT ); Tue, 12 Jan 2021 09:02:48 -0500 Received: from mail-ej1-x636.google.com (mail-ej1-x636.google.com [IPv6:2a00:1450:4864:20::636]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 85479C0617A7 for ; Tue, 12 Jan 2021 06:01:32 -0800 (PST) Received: by mail-ej1-x636.google.com with SMTP id jx16so3626274ejb.10 for ; Tue, 12 Jan 2021 06:01:32 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=zvv6LYFe9mpH/hRqRunavAEnNPwum4yHEeubUaepqPU=; b=fn2ddKJCzrB+l+1z5m6+nd4SmL9wKXkYV+xVkkUqLTNa4Gz0Bd7PZagGEkM0+Q7TeY t5XSjayvP+lEzr3klD/WCkA+RDf0RXTd+/MLvozm/DsrzqOZeWQVz870uCBMwCTeM8kQ S3RoufZj7egVsb1Bhu8vN25HMOJ4GFFb0IvssDiwCQ/1siQs5bg265M8zhwwRzszMvZ1 ysS6R3KpZeaq8yrZROExzfBJKUToRGL+Ylm7U+s53fIfLwspoTw0NmrSQv4o4ddH2eaC JjGRAxMGu/MZNHleKPa+mP/bvCrKRXtFbw6PxiqVp72wgpHE7LFnyCsf6pmmL9Vb1vXW hvNQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=zvv6LYFe9mpH/hRqRunavAEnNPwum4yHEeubUaepqPU=; b=IZKtCAiuGHiZXilLXrIfNPOkkYkUz/po+beVywl5bxcVyDmkfCiG2x/z0iK6Pp8aKm hpdxhCwjQ9gZFYio4j7nl45DBYq9NS2z+jSaKMLsy8zChzpnxnmPnFJ6MwPartPQvgIA mPDBJogMnrEyYXW7EPJ1R5jXd3zPdWILNp8xdiYmKLGKMUPt2nDS16mBe9AMqNo5KEN0 5PeFNw6m9lfdoAWkY1FNmgzehox+E340a7vFM+1Vi6gtIoU1f0dgaeWAqKOp8FwB9sh8 NQDMGUxFQICriUrAfz2c0GCFdUiK8+3TLWtcm35o3rd7yWVDXUQ+iiMB1wJnC+7Yt+GG 0uGw== X-Gm-Message-State: AOAM5316xpe5pXHxK936vf2xdjpxS27fmDD5J+hErS2NxMVaQxG53mCY sIYGMfeknjEPbrq4aDgJpvAWmw== X-Received: by 2002:a17:906:d209:: with SMTP id w9mr3259794ejz.211.1610460091282; Tue, 12 Jan 2021 06:01:31 -0800 (PST) Received: from localhost.localdomain ([2001:1715:4e26:a7e0:116c:c27a:3e7f:5eaf]) by smtp.gmail.com with ESMTPSA id t19sm1227846ejc.62.2021.01.12.06.01.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 12 Jan 2021 06:01:30 -0800 (PST) From: Jean-Philippe Brucker To: bpf@vger.kernel.org Cc: shuah@kernel.org, ast@kernel.org, daniel@iogearbox.net, andrii@kernel.org, kafai@fb.com, songliubraving@fb.com, yhs@fb.com, john.fastabend@gmail.com, kpsingh@kernel.org, linux-kselftest@vger.kernel.org, Jean-Philippe Brucker Subject: [PATCH bpf-next 5/5] selftests/bpf: Install btf_dump test cases Date: Tue, 12 Jan 2021 15:00:00 +0100 Message-Id: <20210112135959.649075-6-jean-philippe@linaro.org> X-Mailer: git-send-email 2.30.0 In-Reply-To: <20210112135959.649075-1-jean-philippe@linaro.org> References: <20210112135959.649075-1-jean-philippe@linaro.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-kselftest@vger.kernel.org The btf_dump test cannot access the original source files for comparison when running the selftests out of tree, causing several failures: awk: btf_dump_test_case_syntax.c: No such file or directory ... Add those files to $(TEST_FILES) to have "make install" pick them up. Signed-off-by: Jean-Philippe Brucker --- tools/testing/selftests/bpf/Makefile | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) -- 2.30.0 diff --git a/tools/testing/selftests/bpf/Makefile b/tools/testing/selftests/bpf/Makefile index bffb4ad59a3d..fb8cddc410c0 100644 --- a/tools/testing/selftests/bpf/Makefile +++ b/tools/testing/selftests/bpf/Makefile @@ -46,7 +46,14 @@ endif TEST_GEN_FILES = test_lwt_ip_encap.o \ test_tc_edt.o -TEST_FILES = xsk_prereqs.sh +TEST_FILES = xsk_prereqs.sh \ + progs/btf_dump_test_case_syntax.c \ + progs/btf_dump_test_case_ordering.c \ + progs/btf_dump_test_case_padding.c \ + progs/btf_dump_test_case_packing.c \ + progs/btf_dump_test_case_bitfields.c \ + progs/btf_dump_test_case_multidim.c \ + progs/btf_dump_test_case_namespacing.c # Order correspond to 'make run_tests' order TEST_PROGS := test_kmod.sh \