Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp9052506ybl; Fri, 17 Jan 2020 05:38:47 -0800 (PST) X-Google-Smtp-Source: APXvYqxWoO4NR+vo7KQsdzVZU5ynLDKgMhc2ik016QznoBXrTpjnvREDGdQt/v4NkfjCh4YfcOZ0 X-Received: by 2002:a9d:6f11:: with SMTP id n17mr6055026otq.126.1579268327590; Fri, 17 Jan 2020 05:38:47 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1579268327; cv=none; d=google.com; s=arc-20160816; b=kKodXYeczIcw/qlEorlfcDSvvGTRV2hh1yhsgsKLAPPaU3KzLa2BFF5YSemyyx4tll IXSS9eq3zHKMVaWi+HlCjx6wpPZ4JToQ3GD9frDc0guVTwD2t6/IwD4pzQIQoGwJ36Oz sfcWmX77HJAQMwX2zKFusoH89RG5rY5d2glL0einCc9Eh90JWPMFy0dEexA0Mp/Iq0FC q4Bo3ck2eBIRo1EYaabVShCB134Ud/7sjmgczd7TTk5J7dQRInYBmU933mVGqeJBkwjh xmZ3I5LK0LRBxLFuXt3iCE/BHfqWVVCYW27UBg9FBEikGBv7dCwdgAKcZtF8kT1Vz3pR GFaA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:cc:to:from :subject:dkim-signature; bh=3uHiB/rHLsVw+zJgXGJkoutNE3orjbRqSapatBIGTrI=; b=Yi2dmmc7YvDyZla8QPN5OccqlFwr8S3QCju+iM7wsncFp1e5XgHCVgUIH2MzArqQZj 97dubvG3ucstR0qJPBMHeSID/S/M15Ctp186RKBaO7hU3yF6ft2zYKB34z4ZRH3U+YBr rzq7ExR/KuYM9OZatTUtvxXKAt+8OEfSSrI/IyHje5aq3VFgALwz2XATcKPLWqxZ5nqf K/FILz7tgfIQk+vRV5/TmeuW+c5dNyXdM/pDnsB5DloMG7y9GyoWL1S1TKOkECqQRxfx 1MhfsAtmc+i3Rf9+qSc9WCWHYSx9Wm1p7AhiUxS7p25pja864o7wpDYAfQo36Vzi8VGr EcxA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=DOzKNkb9; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 77si13553293oie.10.2020.01.17.05.38.34; Fri, 17 Jan 2020 05:38:47 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=DOzKNkb9; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729015AbgAQNhT (ORCPT + 99 others); Fri, 17 Jan 2020 08:37:19 -0500 Received: from us-smtp-delivery-1.mimecast.com ([207.211.31.120]:58099 "EHLO us-smtp-1.mimecast.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726936AbgAQNgq (ORCPT ); Fri, 17 Jan 2020 08:36:46 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1579268205; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=3uHiB/rHLsVw+zJgXGJkoutNE3orjbRqSapatBIGTrI=; b=DOzKNkb99Y1gLMlH1yPgTTMBOcvE6MhoR4zijvO8gk4nbgVCwvoUkBFSO4B6gnoOJ0nCTr ojFKO1RQii8OVWycHUyNd9LDSm2XSi66+EIRKCXC4kDzd6mNdPkEx79zE7m9f8GLty0Jsp 9Ifv/oE+egLR90E9jful0W1+1OR/7TI= Received: from mail-lf1-f72.google.com (mail-lf1-f72.google.com [209.85.167.72]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-25-B5rLdZybPVWxYlFVQ0VMUg-1; Fri, 17 Jan 2020 08:36:44 -0500 X-MC-Unique: B5rLdZybPVWxYlFVQ0VMUg-1 Received: by mail-lf1-f72.google.com with SMTP id z3so4363294lfq.22 for ; Fri, 17 Jan 2020 05:36:44 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:from:to:cc:date:message-id:in-reply-to :references:user-agent:mime-version:content-transfer-encoding; bh=3uHiB/rHLsVw+zJgXGJkoutNE3orjbRqSapatBIGTrI=; b=OQzmC0hRK4yzuugV+LSUYIx1uzarRVbovpXwvxracMpPRm7fW86qzLNvsNulOQQmFR 10J/+t43a1tcwpgHEVJkbOh1I0evNoBEhiXP7xyLwVNxofkLSLhuIObPuIT/K6EBWrk9 SYCQPKoXnSmX4sBksHx5+lwqGNbx7QQwC3pGzzUErkECRP5QAxWoJYPqnNHBfzJNpzb8 Ie9c+qDHtu5vnZzu96QT7EibZ6mbkB4Pa3PvRCbmzceOcElwqZfqaZH7bG46Vn0Qu2op 7TSbTAqZq8JgGc+euecxVad9g7QI+2Yn/0u1NIp1VVjG9dBlAYgntlI6ySDnGsHjn0xh QCCA== X-Gm-Message-State: APjAAAWbC2TGLAqP7uLknGZMtE5e2SV/fEYVZtDzxqBWvVnRQbSYgU5w hs+sdaGS6TLFvgMwRsqouclagpn2Dnu1VDm9wpyIANmB6d9lurt+mWZX2aaIJewRFtsa6YfjfGz 1VQ/ktJzBnlvyrhy+O7hsee+C X-Received: by 2002:a2e:9cca:: with SMTP id g10mr5571408ljj.258.1579268203344; Fri, 17 Jan 2020 05:36:43 -0800 (PST) X-Received: by 2002:a2e:9cca:: with SMTP id g10mr5571378ljj.258.1579268203185; Fri, 17 Jan 2020 05:36:43 -0800 (PST) Received: from alrua-x1.borgediget.toke.dk ([2a0c:4d80:42:443::2]) by smtp.gmail.com with ESMTPSA id s9sm14366440ljh.90.2020.01.17.05.36.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 17 Jan 2020 05:36:41 -0800 (PST) Received: by alrua-x1.borgediget.toke.dk (Postfix, from userid 1000) id 4D2A91804D7; Fri, 17 Jan 2020 14:36:40 +0100 (CET) Subject: [PATCH bpf-next v4 03/10] selftests: Pass VMLINUX_BTF to runqslower Makefile From: =?utf-8?q?Toke_H=C3=B8iland-J=C3=B8rgensen?= To: Alexei Starovoitov Cc: Daniel Borkmann , Martin KaFai Lau , Song Liu , Yonghong Song , Andrii Nakryiko , Doug Ledford , Jason Gunthorpe , "David S. Miller" , Jakub Kicinski , Jesper Dangaard Brouer , John Fastabend , Peter Zijlstra , Ingo Molnar , Arnaldo Carvalho de Melo , Mark Rutland , Alexander Shishkin , Jiri Olsa , Namhyung Kim , Shuah Khan , netdev@vger.kernel.org, bpf@vger.kernel.org, linux-kernel@vger.kernel.org, linux-rdma@vger.kernel.org, linux-kselftest@vger.kernel.org, clang-built-linux@googlegroups.com Date: Fri, 17 Jan 2020 14:36:40 +0100 Message-ID: <157926820025.1555735.5663814379544078154.stgit@toke.dk> In-Reply-To: <157926819690.1555735.10756593211671752826.stgit@toke.dk> References: <157926819690.1555735.10756593211671752826.stgit@toke.dk> User-Agent: StGit/0.21 MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Toke Høiland-Jørgensen Add a VMLINUX_BTF variable with the locally-built path when calling the runqslower Makefile from selftests. This makes sure a simple 'make' invocation in the selftests dir works even when there is no BTF information for the running kernel. Do a wildcard expansion and include the same paths for BTF for the running kernel as in the runqslower Makefile, to make it possible to build selftests without having a vmlinux in the local tree. Also fix the make invocation to use $(OUTPUT)/tools as the destination directory instead of $(CURDIR)/tools. Fixes: 3a0d3092a4ed ("selftests/bpf: Build runqslower from selftests") Signed-off-by: Toke Høiland-Jørgensen --- tools/testing/selftests/bpf/Makefile | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/tools/testing/selftests/bpf/Makefile b/tools/testing/selftests/bpf/Makefile index 246d09ffb296..dcc8dbb1510b 100644 --- a/tools/testing/selftests/bpf/Makefile +++ b/tools/testing/selftests/bpf/Makefile @@ -124,10 +124,14 @@ $(OUTPUT)/test_stub.o: test_stub.c $(call msg,CC,,$@) $(CC) -c $(CFLAGS) -o $@ $< +VMLINUX_BTF_PATHS := $(abspath ../../../../vmlinux) \ + /sys/kernel/btf/vmlinux \ + /boot/vmlinux-$(shell uname -r) +VMLINUX_BTF:= $(firstword $(wildcard $(VMLINUX_BTF_PATHS))) .PHONY: $(OUTPUT)/runqslower $(OUTPUT)/runqslower: force - $(Q)$(MAKE) $(submake_extras) -C $(TOOLSDIR)/bpf/runqslower \ - OUTPUT=$(CURDIR)/tools/ + $(Q)$(MAKE) $(submake_extras) -C $(TOOLSDIR)/bpf/runqslower \ + OUTPUT=$(OUTPUT)/tools/ VMLINUX_BTF=$(VMLINUX_BTF) BPFOBJ := $(OUTPUT)/libbpf.a