From patchwork Wed Jan 13 16:33:16 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: 362159 Delivered-To: patch@linaro.org Received: by 2002:a02:ccad:0:0:0:0:0 with SMTP id t13csp687448jap; Wed, 13 Jan 2021 08:35:34 -0800 (PST) X-Google-Smtp-Source: ABdhPJycfjZksSjVDDqru/r25qp4lpizJq5sUR8DzvLrNl6LHPtSpd5tuLs8tOBGKAMWAAfMtnxJ X-Received: by 2002:a17:907:3f29:: with SMTP id hq41mr2182241ejc.227.1610555734659; Wed, 13 Jan 2021 08:35:34 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1610555734; cv=none; d=google.com; s=arc-20160816; b=h1+igDoXmc1VjBv1OSXb3Q726bORwsT3KxYBv+WzAu2tioq2R8Sx1lJSt6+zXj+zaC 8vCLONBM+HRDbXessbI2yoryzW+5YuJDG+S3nUpfo3H6eBpf3s/U9CsVw0XhM+vtWF7c zZ81BgC0ZXKM2Fy8KKoWF2DwZvRvqUFm5nnFsstPc060nhKWhaIiGobflC6A5laYPb2z FYf9lH+yDqbz/9GgxZxPxG9fCQIagLwrc97rKA9B8gcQ6B19r980i0ob1OfooyMpnkbC 2qt4WS5A0oIrblpP9qk35xerVgW7UqXHCrFeGgBMSMm8PT00MRoJMylMN/xt1YGT/oNt vQrg== 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=WzeKjk6W2CxYi95uCJrjtjO+Mh+ZYv+OVOJ0F2MC/Ds=; b=jflBX3ScAyjMQvaZgouut+eTwvQRI6Cmj/CcybLNKdV+/NkTdGqn7LNw2u4rszaPZ6 A7P2cthBzdJDC0PwdWv8R5mL0kVgmNpq+VFEybxmutNjCQqTYr8nWkZA4Z0UMdzMSkNw AUFIIzQi86zcsmvw8MrnYwBncBhHebtCdzWeNcQAlNFNcUlnukabbyzvZySBnKY1yXOF FE9S2HWpyUW5uFBhoCCe8lAoTqvZ6zk80grSS40EBfzwD3TZpegfT8+fFJ881Z5kSE7w U7LIbXciTuBFQ2oai+tAaEhPKePBo1JoWfZUwqCeTIj/OqBvMpXFprcbqBRUDJeTU2np 3dLQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=V1PkJPpf; 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 n6si1137669ejy.51.2021.01.13.08.35.34; Wed, 13 Jan 2021 08:35: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=V1PkJPpf; 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 S1727327AbhAMQfe (ORCPT + 6 others); Wed, 13 Jan 2021 11:35:34 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36414 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727370AbhAMQfd (ORCPT ); Wed, 13 Jan 2021 11:35:33 -0500 Received: from mail-ej1-x62e.google.com (mail-ej1-x62e.google.com [IPv6:2a00:1450:4864:20::62e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7275EC061794 for ; Wed, 13 Jan 2021 08:34:53 -0800 (PST) Received: by mail-ej1-x62e.google.com with SMTP id q22so3985319eja.2 for ; Wed, 13 Jan 2021 08:34:53 -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=WzeKjk6W2CxYi95uCJrjtjO+Mh+ZYv+OVOJ0F2MC/Ds=; b=V1PkJPpfoUhuI2v7Or3K6Aasit7NEsidV/b+AhjMSV6csJcSObKx1qxwjxyWbZhYTV U1rqPVsA1/Ztz6COPZYjx0gg+fU3+E/+w191oU3rAZTG9x8koHZwx5YGzByKWcYV5X6r UGo5q9tp5tLy2ABaanCMNzyb1q7O19ldm/03VB+tG/EHz3Q1D7ilBrW1VV/4CpLh+fYR HegIe7o2CsyJJMtLNU4p97ATsjL2uN/jronxkOIDh5X0rXbV8At4PwYsyN9bc8HGSm8z Pd4J4o2h1pbbD2TZRvUUbENpy+EQm+U78uOo/K3p2H8KGvn61dnXsyent9BlokqGp1H4 4+/A== 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=WzeKjk6W2CxYi95uCJrjtjO+Mh+ZYv+OVOJ0F2MC/Ds=; b=n/gE5PoUtp26PXRP/UH05NBLliaDqigbpELUZp27D1cm+sfDbtqQ0zccuC8Aa3cWDH TqHRTZJLzXZ1YxQHe7EGryJtfGf5Sofp8qiM6dWRQMj2heZAekhwhPEaaxVeEa62sysO W4sG7AMBi6NC/jopSvtUsTmHoIp4ntPtQuXNzhus91wdQGwFYThxwAo6MtfxEjf2xGGY cIxX5yoEv1kdjbk+bZNpkNygxw9yyJHfjvl29ZE8JSLqLgiBZ+e0bg/qNYFUyTE5jbAA GSnf7jsJyLH9gwYWaxYYsZ+0zJ623UTCvexLd+iSBsYEsQau02ICAovwJVYpVqhRxlu8 tccw== X-Gm-Message-State: AOAM530fljMbz/lm3Rw2GWTynY/BTyvKBOB2ryR2R0cQo1QfVJ2d/UQ8 vZTc7rg9mCNdtvCVbzztYmOEqQ== X-Received: by 2002:a17:907:546:: with SMTP id wk6mr2117779ejb.238.1610555692085; Wed, 13 Jan 2021 08:34:52 -0800 (PST) Received: from localhost.localdomain ([2001:1715:4e26:a7e0:116c:c27a:3e7f:5eaf]) by smtp.gmail.com with ESMTPSA id g25sm923943ejf.15.2021.01.13.08.34.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 13 Jan 2021 08:34:51 -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 v2 1/5] selftests/bpf: Enable cross-building Date: Wed, 13 Jan 2021 17:33:16 +0100 Message-Id: <20210113163319.1516382-2-jean-philippe@linaro.org> X-Mailer: git-send-email 2.30.0 In-Reply-To: <20210113163319.1516382-1-jean-philippe@linaro.org> References: <20210113163319.1516382-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. Acked-by: Andrii Nakryiko Signed-off-by: Jean-Philippe Brucker --- tools/testing/selftests/bpf/Makefile | 46 +++++++++++++++++++++------- 1 file changed, 35 insertions(+), 11 deletions(-) -- 2.30.0 diff --git a/tools/testing/selftests/bpf/Makefile b/tools/testing/selftests/bpf/Makefile index c51df6b91bef..95ce81513648 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,15 @@ 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 VMLINUX_BTF_PATHS ?= $(if $(O),$(O)/vmlinux) \ $(if $(KBUILD_OUTPUT),$(KBUILD_OUTPUT)/vmlinux) \ @@ -135,6 +144,14 @@ $(notdir $(TEST_GEN_PROGS) \ $(TEST_GEN_PROGS_EXTENDED) \ $(TEST_CUSTOM_PROGS)): %: $(OUTPUT)/% ; +# 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)) +$(MAKE_DIRS): + $(call msg,MKDIR,,$@) + $(Q)mkdir -p $@ + $(OUTPUT)/%.o: %.c $(call msg,CC,,$@) $(Q)$(CC) $(CFLAGS) -c $(filter %.c,$^) $(LDLIBS) -o $@ @@ -157,7 +174,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 +199,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,9 +216,14 @@ $(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): - $(call msg,MKDIR,,$@) - $(Q)mkdir -p $@ +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 $(INCLUDE_DIR)/vmlinux.h: $(VMLINUX_BTF) | $(BPFTOOL) $(INCLUDE_DIR) ifeq ($(VMLINUX_H),) @@ -211,7 +234,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 +242,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 +474,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 Wed Jan 13 16:33:17 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: 362160 Delivered-To: patch@linaro.org Received: by 2002:a02:ccad:0:0:0:0:0 with SMTP id t13csp688509jap; Wed, 13 Jan 2021 08:36:51 -0800 (PST) X-Google-Smtp-Source: ABdhPJx3ULswXHf6jE6O5NjxKr58osDbuGxub44K5h0d/EBreepCE/zctfh9w+mgOeczNJjsJN20 X-Received: by 2002:a05:6402:746:: with SMTP id p6mr2447174edy.313.1610555811508; Wed, 13 Jan 2021 08:36:51 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1610555811; cv=none; d=google.com; s=arc-20160816; b=eQhPJLEli7OFdGdTi83P57rcPnwRD1urxl2eKKhnr9KnK2HfVF9LK5J9UYabgmEM3m mkMGS9Zmdv1jEngPQuancORWCGIidR3/kIJvb3YK/quOlcL/p7VatPiQO+pd6HzpmyHx XTT+UhzoP8PhLqRrnxlsuyKjwfYPJNpdRlsEAzaONu8Wz42maesimYXfpSGK45LUhCVI 7x3hkkHmHpCzDtstTMxLt7meOHwHzCSaDymxP/ZTkGUiDQhUeEM/h3th/kseXL+aQSsD LHAcCajeKaoQck7vz+urjAdptrMvXKRYb7gZxfrguFxAjAmdyywi/nj0F0K7wFQQ0gcN fcmQ== 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=imxNOIL2ER7DtcMLfQ/6C1z3KS46am+Q8zrFjZV4vkQ=; b=tKMuXLwP+L0KyvPuWqMhUjYUY7aj4VAmdXk7Hl64tqsqe/S0Mw5hTnbDW0EYJ3jlRs B5vepkHsjSbKLxhRMwos4YQc7HzwUSrospnH2835nUFtZEZsl80pAzEHur4c6IiY0yko +MsaCcOvWp/YBvZU+5sFFmOZ0Wg+0x1nf6/5qUoL4WxBpFe/cDRXLMUx4mwYk5EsdQyU vFj3OCBPZaz4wrPG7eiZ9ffmIzDri6qFlkH6y4QnREw7qwXMgKLLJuzMZR0nIy2TpxOf AdsFYLSppoL5KojeI3zbwIHVoZoIEYe1UzcRmC1wNCTFfSNz5X8WGW/YdAgKbxWX81BY sFfQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Kjwx42ms; 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 x11si1155669ejs.461.2021.01.13.08.36.51; Wed, 13 Jan 2021 08:36:51 -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=Kjwx42ms; 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 S1727406AbhAMQff (ORCPT + 6 others); Wed, 13 Jan 2021 11:35:35 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36420 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727370AbhAMQfe (ORCPT ); Wed, 13 Jan 2021 11:35:34 -0500 Received: from mail-ej1-x630.google.com (mail-ej1-x630.google.com [IPv6:2a00:1450:4864:20::630]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 742B6C06179F for ; Wed, 13 Jan 2021 08:34:54 -0800 (PST) Received: by mail-ej1-x630.google.com with SMTP id e18so3917712ejt.12 for ; Wed, 13 Jan 2021 08:34:54 -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=imxNOIL2ER7DtcMLfQ/6C1z3KS46am+Q8zrFjZV4vkQ=; b=Kjwx42msNjsVsAuTlIgBlFA9ZiedF39fMDSTDx/uckfRWrku2SMld2JIZoV3curmq2 0PRYHBZXnn5PZqOlPGjGiu4nqP8KHft0NfPoRx4MlAJG/mocoNSqN91WySExPaUgDoya 4127NK+NdAeUYjwhLG7eroAVVu8XRMLzgidw5MGuxr2X+wzsvD/EnsqA0KPh99Az1iQQ 4cCM+W9j4z76qPSynvGJqstRDe1g9I99miFxjGiL6aqCmi/Wej2wXufK+BplN/oksnfT vQ5kNWocVePxAhnq3mkpfPE9QpaHQYeI2tu7WcZTTdSiWbhTMkqHt+eutDKft2jA0TGn eymQ== 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=imxNOIL2ER7DtcMLfQ/6C1z3KS46am+Q8zrFjZV4vkQ=; b=qOPoITFs6htJpaELdpss9zw9+6UnkazOCvOUxGlYU70b7T61tSXOAefxQyqgHnSNxg cXM0e/UnJmFUxmfrYn4bsif3eoaNw6LGlDUz8zQ78khuZ8cRixmnG60lXW/N6KgRuKr8 njd4ZIk7MKMGJpVM6aFhe5hG1XKjC+7pNSbRsJuEKZmnjzNYtEfaZCZK4UIBicligIOT Ovl1TaMUVq826cBgSD6GURcQp+Fwc6WXf+b7t8RhsZqdw7gUa3bvN2x0HFDLnxdulSdZ 9N4O+vNmGBO+LE+RL4Svm5RAf9vy6xaF8yjREPqzVnKANpm0p14UrnBvptmR74wueqVd Q+DA== X-Gm-Message-State: AOAM531+FsKTKG3AqUil8dljpDlLVqWKIdFGizkvzwvXIBYOUk3mwXjM 9WfBOm+Wd4qyudobqHblkZtGxw== X-Received: by 2002:a17:906:ece4:: with SMTP id qt4mr2038296ejb.311.1610555693177; Wed, 13 Jan 2021 08:34:53 -0800 (PST) Received: from localhost.localdomain ([2001:1715:4e26:a7e0:116c:c27a:3e7f:5eaf]) by smtp.gmail.com with ESMTPSA id g25sm923943ejf.15.2021.01.13.08.34.52 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 13 Jan 2021 08:34:52 -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 v2 2/5] selftests/bpf: Fix out-of-tree build Date: Wed, 13 Jan 2021 17:33:17 +0100 Message-Id: <20210113163319.1516382-3-jean-philippe@linaro.org> X-Mailer: git-send-email 2.30.0 In-Reply-To: <20210113163319.1516382-1-jean-philippe@linaro.org> References: <20210113163319.1516382-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. Acked-by: Andrii Nakryiko Signed-off-by: Jean-Philippe Brucker --- tools/testing/selftests/bpf/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- 2.30.0 diff --git a/tools/testing/selftests/bpf/Makefile b/tools/testing/selftests/bpf/Makefile index 95ce81513648..92888eed89f3 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 Wed Jan 13 16:33:18 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: 362161 Delivered-To: patch@linaro.org Received: by 2002:a02:ccad:0:0:0:0:0 with SMTP id t13csp688517jap; Wed, 13 Jan 2021 08:36:52 -0800 (PST) X-Google-Smtp-Source: ABdhPJzy3lzF7lD20pR5Yz+SfG0zsIqbQWXR40dgPmWnduZ+3JBXqoa1Kk+LulfpDly6a8nQB52/ X-Received: by 2002:a17:906:c254:: with SMTP id bl20mr2156544ejb.336.1610555811935; Wed, 13 Jan 2021 08:36:51 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1610555811; cv=none; d=google.com; s=arc-20160816; b=SIvXuL2zJfK5lZd+DXrSgCOUPAMnwXYc/aYSy+fUyCKZtXmTq0PDvmgrTEUhyDsAyQ Qv6UQQilSJk8T/TBnPWs58EU6qxjcLIZOSRea6Y/I2uqHbudzK/+i30D8gBuUn9O1kWr 6HzqgcGwmxYhwfLr9Z7EnxzBR6M1pCryI5CNkLHnhydcomK2Ve9vjqyyGbgk8CznYBAQ sQDpk3h470KV/1xFdhvpf8BNhOtYRwMoe/lI9NyKWok6Oefvo77WOs7hgkLz66uQWC2g hfRvEKcGbWcNk6q82NK08+Ujop8CFBnLYrJ3CXZ2aiziEIAcKbngtQu8448rSSe5AC9e jI0Q== 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=ortZEFtRxUHru0nbidQWEmOXybckovOr5wRf4WEJjFM=; b=sBRoKZ8F9KZ3ePqR924EnNzDkkf3xOkbeDFgvee7FLDF9HY0gvbYZbSnTItHN+hwdM foyU6YwKgpiWkzOAUH7PoVX9FFAtQv24Qi527TLfIZrwogEzmuK35km1kxHhiz7lQ49s 7VM5+T869qBf7IQN8oO3DBt11j94dt1Y+m9Zk0I2z44AJdJarKEu9f/taRZqA0zV+Unx vLm2XhNVqozZp8QJy4kmRLU4mlSzWO5Zgyiokds92XYDE7JbCWUKbV6wt/Ab3BKPCfK9 YFdNJK3sRt7MtzL9FoaPZaexKdVtAvC66HFVnPOlblOmg6kL3EzFNmF5gZGBDuxEPPEP lxQg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=a8++npUH; 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 x11si1155669ejs.461.2021.01.13.08.36.51; Wed, 13 Jan 2021 08:36:51 -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=a8++npUH; 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 S1727561AbhAMQgN (ORCPT + 6 others); Wed, 13 Jan 2021 11:36:13 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36558 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727630AbhAMQgM (ORCPT ); Wed, 13 Jan 2021 11:36:12 -0500 Received: from mail-ej1-x629.google.com (mail-ej1-x629.google.com [IPv6:2a00:1450:4864:20::629]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B7D65C0617A3 for ; Wed, 13 Jan 2021 08:34:55 -0800 (PST) Received: by mail-ej1-x629.google.com with SMTP id e18so3917809ejt.12 for ; Wed, 13 Jan 2021 08:34:55 -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=ortZEFtRxUHru0nbidQWEmOXybckovOr5wRf4WEJjFM=; b=a8++npUHoFCwDIM5u6xxezEiajVUXj9kNbUL7gaHw8elD+3ybFg/9Fp2aDjy6UsXnu qo1mWCj7GY0ddbZyrWDHtUOpPrldMvEMxFGKIw55sZk93tnLSyCrwnTn+JJ8Bs8NilUc 9n7R5GK1UQCF2f+BlMJX4KnA8U9biEqOaTAoNjbOeWjQQDnjJRorUu3El+/PB/rLDYre V06JGLLOiym+BF4912W6EVw12y1LaEz2LcPZ04yGXUjfW9fxBhEv0lW8OBQHcjZ06aCn lgqSW1xrQsvR7VxUXQ/RgAgGfbaAE01ieNKdIzJDwgnq03JrYOYzey8S0ypxpUpRBRBL tYtA== 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=ortZEFtRxUHru0nbidQWEmOXybckovOr5wRf4WEJjFM=; b=Mj2oxHfChByzryCT6ss2mJKkv1wvYZAPo91Jo2YyM8Mq0fLYAlxZO92c/1989pA8Qf SIzgj0Hsv7JHoNCMN7FNcuOVaAe25456VuZX50hGBBUe7RtOPJd28G6ZSwocYCWozKuR S01dXphiLRBIXBuf0Uu3E4UkTBTG/JbtxOxq+w5Sr8iRkR2vqodDuvIgEAP+9morAHCy W912wjf3MU/zulGECTvvzNT9whAWTdIqqCf76UCzd5W2ywJT67DHDHxBjoX6S7H9djpO BP1SkuIOelcPkWXke0IgkVUMeKwMylxZGFrz6CmqSudooa5cdvzJut952/8PxLq/5mgN FIPw== X-Gm-Message-State: AOAM530QyJoyugVoNyHLmGCnsg853dfjihbIussZ35Hkv0NKR8Nn95B5 NUZQWYZVdfgGoF0zb6w+yn5fQg== X-Received: by 2002:a17:906:3553:: with SMTP id s19mr2112447eja.95.1610555694454; Wed, 13 Jan 2021 08:34:54 -0800 (PST) Received: from localhost.localdomain ([2001:1715:4e26:a7e0:116c:c27a:3e7f:5eaf]) by smtp.gmail.com with ESMTPSA id g25sm923943ejf.15.2021.01.13.08.34.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 13 Jan 2021 08:34:53 -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 v2 3/5] selftests/bpf: Move generated test files to $(TEST_GEN_FILES) Date: Wed, 13 Jan 2021 17:33:18 +0100 Message-Id: <20210113163319.1516382-4-jean-philippe@linaro.org> X-Mailer: git-send-email 2.30.0 In-Reply-To: <20210113163319.1516382-1-jean-philippe@linaro.org> References: <20210113163319.1516382-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 92888eed89f3..67cdf858f01f 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 Wed Jan 13 16:33:19 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: 362162 Delivered-To: patch@linaro.org Received: by 2002:a02:ccad:0:0:0:0:0 with SMTP id t13csp688529jap; Wed, 13 Jan 2021 08:36:52 -0800 (PST) X-Google-Smtp-Source: ABdhPJyYEv8HJh5bRWayoyIA+qiebtGMs+MNiZ7z7UYvD06VCSBKelUIxosr1P3WSx0M94Ck/lJV X-Received: by 2002:a17:906:ae4e:: with SMTP id lf14mr2298997ejb.310.1610555812312; Wed, 13 Jan 2021 08:36:52 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1610555812; cv=none; d=google.com; s=arc-20160816; b=rcpWF3C/WOvOi1dtnTwaM6Wt1S9809/y/jDEVwq0KbpHyluYUqSWyh//h2BKffV7zT o0c1b4jnTNuKE5FXsZEU9Z5fWaE3n7m3A8Euz+UQsuNsYXiDwaEbznhsexwCUPB3RzgU RBKUFfQacFa0Z/f/+gBBPGksEPvVsMG+zDkTyMmgM5h9Xb262q8d1Ysd+zDWaH48fWcS cnXzBC9Zp2ptIQGdnexj7ZyYYnrUKhGO1C+/J99FTgXsjAOnZOCByNV4Vu/cE5fHQ/gx ywsN0OIirUGznBWycXZUkxrFnCb9qX0W/8DopiskFD0/piVCFBI0iftzgsdxx+dX3Vfv DpEA== 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=jXQ6vMa7f3RRXc70uOmWKXVZ59ITEzz6ydYPgh3UHMU=; b=ov1SEzVAnK/tZKd8gmsXZMFZ6xVx6jepeQzi4LoR5/MiWEbGILdtm8jRkeCUlI+J62 x4hD4A0mPwwUzW2AmhZpsc373f6So71t/iVpa3Fa34jc3G2DZ1lrazSOMqm+tJRAF8Nt PmIFH7UtgmaoXKhC1UFOy+TufNDuOPN2qImlLl6cvYvdRwNDSrI7TuG2GLd9DGT5AYJs zu2N0EkscYfku+jBlHe3biu29WGutYctkAIoVrdPUUocljaWXeN4ts9ZBmLjxZihMLFn MZ1eff+bqQXSXF8Gl5vbsfzJnyt92Yt1QQQv5Pvp87Bwa5hYeOvBrJG4SNwdQf8MrsF+ qH/g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Fs6aFm7F; 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 x11si1155669ejs.461.2021.01.13.08.36.52; Wed, 13 Jan 2021 08:36:52 -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=Fs6aFm7F; 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 S1727661AbhAMQgN (ORCPT + 6 others); Wed, 13 Jan 2021 11:36:13 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36562 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727678AbhAMQgN (ORCPT ); Wed, 13 Jan 2021 11:36:13 -0500 Received: from mail-ej1-x629.google.com (mail-ej1-x629.google.com [IPv6:2a00:1450:4864:20::629]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DBF00C0617A5 for ; Wed, 13 Jan 2021 08:34:56 -0800 (PST) Received: by mail-ej1-x629.google.com with SMTP id w1so3927600ejf.11 for ; Wed, 13 Jan 2021 08:34:56 -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=jXQ6vMa7f3RRXc70uOmWKXVZ59ITEzz6ydYPgh3UHMU=; b=Fs6aFm7FeMEyhEFtBLTnCCPm+UPC7JZRY20GjPnEBNQ0PXAkirddbeguIhxj3rgg1g dHfbOhgYsvDN2q4fdgmr4g46+DiDnR+8T2Ef9V4YtSOU9U1ondfDaTGpDxU/B07rdQ5/ DJtbGcPX304Nyq1IsxCg1YdYLChvlzmdo2zq0M8n5111u4cXTeG1Mxx0jY0yKVeIXzd6 r3QZMaVuFkZ8v0ChFHBf5CslxlZ2KhrbcP/an0PPA2BTFrba7l/tz22a40QgYfqbHw8d zIn8DhVGxXk00DZ5mNb24Y2MxlZukJ7YaMz2nrn6rRsN/Cvk+N2EIen7HctUv7R+hKrc HJOA== 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=jXQ6vMa7f3RRXc70uOmWKXVZ59ITEzz6ydYPgh3UHMU=; b=NQnC9C1kjAtP62Le46yatN7Zac5EmMm7s4G8qoiQvb8iGSlz6l0yN4lGl/bqbBdM7B OLW+qsMnBDuUiBnxq3S2ZChWjVBGA2bejnntrEVC85KLVnmoDDdpJIZjApgMXjDxahQY HSgokRjHZDnA6JbUkhs9jFEH9gc6DI9X1XVmQ+bTWxP0raq5wgJOR5CbaoxjQaOgl7hd 1r6BWqtRdr6evMj4QTuSjJL0Gh8JWXNmev4rISgrVkFwqX/e4K2fVDR3E3zroF/TAvoX AGgrv/WncB5nIRSST/RXIJZJRsC28uhp1rE/yX8OTt/TbgR0kzFak42V1eXFP7lNZPg3 phSg== X-Gm-Message-State: AOAM530245/uhXZCZdaV3vz1A037vrtKIZDd0XfPTgfaWGGhIZUlPXX7 1TC5jjVEoIE8f6lihH0vlu5xOhSbAfjBLg== X-Received: by 2002:a17:906:39d5:: with SMTP id i21mr2066874eje.339.1610555695624; Wed, 13 Jan 2021 08:34:55 -0800 (PST) Received: from localhost.localdomain ([2001:1715:4e26:a7e0:116c:c27a:3e7f:5eaf]) by smtp.gmail.com with ESMTPSA id g25sm923943ejf.15.2021.01.13.08.34.54 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 13 Jan 2021 08:34:54 -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 v2 4/5] selftests/bpf: Fix installation of urandom_read Date: Wed, 13 Jan 2021 17:33:19 +0100 Message-Id: <20210113163319.1516382-5-jean-philippe@linaro.org> X-Mailer: git-send-email 2.30.0 In-Reply-To: <20210113163319.1516382-1-jean-philippe@linaro.org> References: <20210113163319.1516382-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) Acked-by: Andrii Nakryiko Signed-off-by: Jean-Philippe Brucker --- tools/testing/selftests/bpf/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- 2.30.0 diff --git a/tools/testing/selftests/bpf/Makefile b/tools/testing/selftests/bpf/Makefile index 67cdf858f01f..0fafdc022ac3 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 Wed Jan 13 16:33:20 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: 362163 Delivered-To: patch@linaro.org Received: by 2002:a02:ccad:0:0:0:0:0 with SMTP id t13csp688536jap; Wed, 13 Jan 2021 08:36:52 -0800 (PST) X-Google-Smtp-Source: ABdhPJx+HDveBRcNhSmceDazAMd+je3G07+MNqAOM8LCQnqnh2L+CiuJE9OFOMO51BJe9SFkWwgG X-Received: by 2002:a50:b746:: with SMTP id g64mr2493158ede.33.1610555812702; Wed, 13 Jan 2021 08:36:52 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1610555812; cv=none; d=google.com; s=arc-20160816; b=W/ey3Rga9TghSstH7kYkpo4N2hogNEwNc7VWVYdQIPXIfc8auaJwCAQ1/BHULsN82T 9FxbMq/Q+IME0pwbx2sFQ8nozwy1jTAmLevevPOdC/D5qEbFOEffMjY7Fkr9oto/WMAi Rm9oJSnuAkRXXYC4kf0l4k1MSFj//8/L2o0wxz0iL+4WWnrLJCIEA3mOREBjVapjgcfi iXC1kcOebaWENLNfz/lYiVT4NUT9LzFZ6OoZOv2Lv4S1+atMFBhVBzesG7Pb2NSb4rNi Gx/nL+08ExSDPWLIhMsyM0akVW4qow+wdg4zBKH+cSyfgL7R+5jEHwoFHsEddyLglK8f tQXQ== 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=BdIvDbIaLfjihhRkhU5/HCzUvJ+o4x5+Y+DliwVMXI0=; b=BqX8o5elv//TZ206FhsE99ZascbBduC2UBIcei3oPA/+S5oapmapwmcNIVPPijdCDR pjzDfRj4qzshoVKLi2GCyT/2wFBJMxw7EjjaUOwIMtjT+AdIC9/vfcJk8SZrjHZscXoz 7Dke2LAB5unP8tdB3UoaUW0ng0W3hSavOoLYPW4lwl4VTfswEnEsN4gAxAy+haOvlDf6 AQY2h62RgrYvBb/BPxE8GTZYXWek5FE+qy3m2ngP5fybR/w8D0GeRtwA1icqlx7Dmd41 1+Tpaq4S2yjQkQUSKx4mM2UKEQKnwHIsSvQEUjXSuE5umDg2ZMo+y5+X03YDFa9/L/MV oxkg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=hxRotWBE; 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 x11si1155669ejs.461.2021.01.13.08.36.52; Wed, 13 Jan 2021 08:36:52 -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=hxRotWBE; 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 S1727720AbhAMQgO (ORCPT + 6 others); Wed, 13 Jan 2021 11:36:14 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36572 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727713AbhAMQgO (ORCPT ); Wed, 13 Jan 2021 11:36:14 -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 00261C0617A7 for ; Wed, 13 Jan 2021 08:34:57 -0800 (PST) Received: by mail-ej1-x62d.google.com with SMTP id b9so4025911ejy.0 for ; Wed, 13 Jan 2021 08:34:57 -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=BdIvDbIaLfjihhRkhU5/HCzUvJ+o4x5+Y+DliwVMXI0=; b=hxRotWBElbEIKPd54uMcTCedGp59nZYVMAeKuPhfY7dKVGEI7lk+k5HRAf5JslUYyd vbFiqyIDHgKPfPUZde154fNm1GroSTz8+gqXxs5MAldGUsy0d8r25SRnnRBp51FUx4lS hjStaBFfh2SmbOxvuJRjGvgs1HRwxB6hsd1LMie5HvPVBJ8vI5LkFdC3avjtmtZtcccy RHWn8tbkEOMWD+W/7LHYCJ6fT0y6JvlSBsLY3cFI9YAakurrVZSPB3M9/o8u0PDNOKf5 S+fVjAY3aO2aqeSfdjuNPnwhhFsaOqqI2Z12SRuFv262uPbmwGRGZUbzQqE/5GbZmhpY QxyA== 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=BdIvDbIaLfjihhRkhU5/HCzUvJ+o4x5+Y+DliwVMXI0=; b=AeE3W5HfjfVNe4QCM8DkP7/CvI4T07YKREhnzLowXVkbtxWpZP8h8VRmH/Zgx27Jnt 6zJuTweDZsTXFauGzCli/2VXHSXyEH+yYvUYsG3BloSmv8PaPD2XMAtHHOjaYjTjZszq 1D7mu5frweM6w4k9uQGQ3ELFYzJ8E6vUATn2RleB3kQr5atJxiH8LeBhAdM0Mhdu8i6w nRFrCeJXXtcTAJ4QqbD6meJOznIXspFw5jovga0trBbO2vMzQlFX/2kGf//SDUtrNlvf OpkGjsa6JLWviuF8n+f45mvYMDh6uRrTyvQ+0gFyiDwMcJtadxDdEMmMCP1/c2Ne68+N isJQ== X-Gm-Message-State: AOAM5308EixpZeyS370nQ3MiEDrpQCMAQnlocxPIzFnhir6hm44omJYi ZGr5EGu8m1IiFxP/jVXC2ubVAA== X-Received: by 2002:a17:906:bc9b:: with SMTP id lv27mr2079635ejb.505.1610555696700; Wed, 13 Jan 2021 08:34:56 -0800 (PST) Received: from localhost.localdomain ([2001:1715:4e26:a7e0:116c:c27a:3e7f:5eaf]) by smtp.gmail.com with ESMTPSA id g25sm923943ejf.15.2021.01.13.08.34.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 13 Jan 2021 08:34:56 -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 v2 5/5] selftests/bpf: Install btf_dump test cases Date: Wed, 13 Jan 2021 17:33:20 +0100 Message-Id: <20210113163319.1516382-6-jean-philippe@linaro.org> X-Mailer: git-send-email 2.30.0 In-Reply-To: <20210113163319.1516382-1-jean-philippe@linaro.org> References: <20210113163319.1516382-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 | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) -- 2.30.0 diff --git a/tools/testing/selftests/bpf/Makefile b/tools/testing/selftests/bpf/Makefile index 0fafdc022ac3..7f8667ad113e 100644 --- a/tools/testing/selftests/bpf/Makefile +++ b/tools/testing/selftests/bpf/Makefile @@ -46,7 +46,8 @@ endif TEST_GEN_FILES = test_lwt_ip_encap.o \ test_tc_edt.o -TEST_FILES = xsk_prereqs.sh +TEST_FILES = xsk_prereqs.sh \ + $(wildcard progs/btf_dump_test_case_*.c) # Order correspond to 'make run_tests' order TEST_PROGS := test_kmod.sh \