Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp9524169ybl; Fri, 17 Jan 2020 13:38:14 -0800 (PST) X-Google-Smtp-Source: APXvYqzaZpCZmkipBZt1jFikl26KFu0OuM0wkc110l1CNhJ7572WGTZW6I7wOVYnow1EhQZhJv8X X-Received: by 2002:aca:d787:: with SMTP id o129mr5116019oig.75.1579297094277; Fri, 17 Jan 2020 13:38:14 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1579297094; cv=none; d=google.com; s=arc-20160816; b=wlq6bAef8s87DK5altTD5ZmiU+MD4bxx7RkRcullATlqTxKiczLVFqyTXMWpbx9PNk KdIZY4oOnzoFBMg0AYwj7GbRfxZov/Z+gsY6y/J+lTw69I8oTWm25U3/T3L/u5N6tWAn n9Btddbrdw6D0Q0JOZwwrYLfut0ODqYyOScZ7BIrQkQI1WxvNvS3J+nTrnOYzZWFOtd8 SHv+eKif9yh0/TFiPl3RBlXNuXyKSTNP/nJ3JcNLy9/inmhmqs1INl9UdlAR8e/iVYZd 6TSe93dwFYHlcb+Tbck1zj2gYncQT9WzuDDKswdtz011JX4D0+x5KyCDFt0Xl0nhgkpa +U0Q== 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:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=2JWxiBrKzgX6c58K05T7Uj8uthaAPk9I0HG0fUbgl2Q=; b=CM0BFplPc2rDvI8ovjcvdDtQGqiKMRTdPPW2uZesXC9LNEyuuBTR6tShCwNXUI8s3L fkfCAo6cNZCldPuwtGrI7j3yf4gBWTWv+HLJlNAqGQLhqQ5PZcwloEmr9MOTkrBvehOd oIVwCA9ARFdpLNUES/WbceWH5Lxg+BOPKWkDIB0m/iI97jpyfqo8FVAaPjHlSM9ZFTwo 49H/KBeMFgzOqbgbJqsrIHMUT5tlN4B/w/vkk0nyB5Tz1IDss2DfW4dFzL9cRinVOhL/ 9Y3e+HD8+hEzeLgXYw3C5Tnc6hsEsppak5BA1R/PnEW+YpdEdzbTpt9wqPPLsz6Dcgvx 1q/Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=di2yyj+z; 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=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id b67si4989901oii.79.2020.01.17.13.38.02; Fri, 17 Jan 2020 13:38:14 -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=@gmail.com header.s=20161025 header.b=di2yyj+z; 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=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729080AbgAQVhJ (ORCPT + 99 others); Fri, 17 Jan 2020 16:37:09 -0500 Received: from mail-qk1-f193.google.com ([209.85.222.193]:39278 "EHLO mail-qk1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726587AbgAQVhI (ORCPT ); Fri, 17 Jan 2020 16:37:08 -0500 Received: by mail-qk1-f193.google.com with SMTP id c16so24182417qko.6; Fri, 17 Jan 2020 13:37:07 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=2JWxiBrKzgX6c58K05T7Uj8uthaAPk9I0HG0fUbgl2Q=; b=di2yyj+zUzyiwdu9o+rxLuvbgoB7dTPwpFBNgyLV/RIImJaI/rV3kq41mVzfXGthXL k1CDbjNlUUt1QDOpws4zX7lrQjilnCXze/8/TnDvUM1/xP71VHcg7SO4h20Sk1a9X/iT N9a4P+TocZpdyrrkTlRE3jUOfwnbLa03eUxoolr0+WufJPDYGTKV3QmCl3PBf7aYSf/g 65IAMoyo4/wDBpeOpeE52Le9/rMfrWP8Ld3VQlpyrJJqCUY62G8oA9BOz2L2Oqr327RT VUOOrNbOufy8Zz0XF6T2Goh27q6MrvGtMS3UbVfYwjSvdttcblfcaDsEvxBRgC95wISx cD3w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=2JWxiBrKzgX6c58K05T7Uj8uthaAPk9I0HG0fUbgl2Q=; b=lj6v6BEegc9yCrvv7XiYz07nBlOIfHzS1VC7yCSJzXWSrVqJfriorzETI+NJfS0ABK 8yaqE9ooiUbhkEByOqzGkESqna2HwmBHk1+SRTlyBib1SyrC3m9G6J4JgOR+pcizS6XD 6FPvszKksI8y/1OoD3/pieigEJdCZxTOkfFAoqgFYmbKAXz2ah8Z6OYQQTY2YIHfXrpy WIePBfW9wN8Cq/pfCoqRtlY4HXKCHLia7y+FgkBYF7dthcj7BcRZXRcG4usaUWpen+la XKndWe6u3TE5AF++PNFHDInKbj51i1mFze0I4EKa/M8/ZgzHN9VbzV/ebWuuXXidAa+y 485g== X-Gm-Message-State: APjAAAUUP7UKjXHQcTYdpk00/U+nVmeVZjZ27dTGYWHbfnOe+aUBgNxO jYHEq+O2FGUyl/Celo3H2eOG3HlBjbtRnO9z3hs= X-Received: by 2002:a37:a685:: with SMTP id p127mr37379374qke.449.1579297027145; Fri, 17 Jan 2020 13:37:07 -0800 (PST) MIME-Version: 1.0 References: <157926819690.1555735.10756593211671752826.stgit@toke.dk> <157926820025.1555735.5663814379544078154.stgit@toke.dk> In-Reply-To: <157926820025.1555735.5663814379544078154.stgit@toke.dk> From: Andrii Nakryiko Date: Fri, 17 Jan 2020 13:36:55 -0800 Message-ID: Subject: Re: [PATCH bpf-next v4 03/10] selftests: Pass VMLINUX_BTF to runqslower Makefile To: =?UTF-8?B?VG9rZSBIw7hpbGFuZC1Kw7hyZ2Vuc2Vu?= Cc: Alexei Starovoitov , 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 , Networking , bpf , open list , linux-rdma@vger.kernel.org, "open list:KERNEL SELFTEST FRAMEWORK" , clang-built-linux@googlegroups.com Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Jan 17, 2020 at 5:37 AM Toke H=C3=B8iland-J=C3=B8rgensen wrote: > > From: Toke H=C3=B8iland-J=C3=B8rgensen > > 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 informati= on > for the running kernel. Do a wildcard expansion and include the same path= s > 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=C3=B8iland-J=C3=B8rgensen > --- With formatting fixes: Acked-by: Andrii Nakryiko > tools/testing/selftests/bpf/Makefile | 8 ++++++-- > 1 file changed, 6 insertions(+), 2 deletions(-) > > diff --git a/tools/testing/selftests/bpf/Makefile b/tools/testing/selftes= ts/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 :=3D $(abspath ../../../../vmlinux) = \ > + /sys/kernel/btf/vmlinux \ > + /boot/vmlinux-$(shell uname -r) it's not 100% consistent in this Makefile, unfortunately, but usually (and similarly to function arguments) we align items for such multi-line statements > +VMLINUX_BTF:=3D $(firstword $(wildcard $(VMLINUX_BTF_PATHS))) > .PHONY: $(OUTPUT)/runqslower > $(OUTPUT)/runqslower: force > - $(Q)$(MAKE) $(submake_extras) -C $(TOOLSDIR)/bpf/runqslower = \ > - OUTPUT=3D$(CURDIR)/tools/ > + $(Q)$(MAKE) $(submake_extras) -C $(TOOLSDIR)/bpf/runqslower \ > + OUTPUT=3D$(OUTPUT)/tools/ VMLINUX_BTF=3D$(VMLINUX_BTF= ) > please, keep \ alignment, it's all over the place > BPFOBJ :=3D $(OUTPUT)/libbpf.a > >