Received: by 2002:ac0:a5b6:0:0:0:0:0 with SMTP id m51-v6csp2015165imm; Thu, 7 Jun 2018 04:10:31 -0700 (PDT) X-Google-Smtp-Source: ADUXVKLIw2XYFD4Hn8arIOXwZ8iJkL1HyD5GYXVbM43RncssyjSbCedRtrqFjn0i/ANPNp+ON6aI X-Received: by 2002:a17:902:1681:: with SMTP id h1-v6mr1547378plh.144.1528369831203; Thu, 07 Jun 2018 04:10:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1528369831; cv=none; d=google.com; s=arc-20160816; b=jApytrrTdHNU/fJ3lsuN8gb23CaIkf3P+Cb+lsH7Mb5Mla5SdDw5RlSn2eIjhmJM1Y SERLUHaxNO/5Mw/oqCzPtAr5dETFQmFp/fqMPsWlHU4OKbSI+FdSTcXA0U+0l+Rpvzfr 9dF2/io7kPMJO2gxfNf9EnUpUgw+yizAsc6zr+iPvsjrMf7Fs19RVOWCZN3t4AIYSrOo VYE5iXxd04L/CIfNF6VV0j3t0VZzbfbect/epdj+DmotxP/hZkp46gMexIHtCnIP2RpT b1MPCTckT0ZbQAVFDDc6WZ50OikedjOqeKtX2ROuZGSKCOMcfC6E+PYWhnIjc9dp0VuQ 3DnQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :references:in-reply-to:mime-version:dkim-signature :arc-authentication-results; bh=MFl4EP+B8XV5a9PfDXfx8E5EQDotN4PEqm2HDvyX5eg=; b=BlF8My7/HPdGZXWVGuh/KnadIUAgyXZ0ubX16eH+WnXJjbwJSDFXK0MmRuFF8W+87Q rutfxuou4zf4aR5rAbRAjr6ToZxGjqxjyYDJunf636MQlGfxTMeOBSCnGkCTAy70IGO1 yzYBNP6YDdufjckMRXU7SRMGAoZqXVVtKFZsSzlGGHu7Qqo3vVJQm52rYiEVcUCvt8JW Onw9MByTJ34uf495EAh6db4wflsqCLc4W6jFJJwgf1I24I+4LI2obo8JCn38FoQGVqlS PXEy5KgsI4Vm1WNb9vjnAEW6VU5w99A6mdWFCSIs3HL5ag95sB/JHZqXZAiHqgrFfwqD QEzA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=WSa/dQMR; 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=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id w15-v6si55214165plp.7.2018.06.07.04.10.16; Thu, 07 Jun 2018 04:10:31 -0700 (PDT) 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=@linaro.org header.s=google header.b=WSa/dQMR; 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=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932463AbeFGLHh (ORCPT + 99 others); Thu, 7 Jun 2018 07:07:37 -0400 Received: from mail-pl0-f68.google.com ([209.85.160.68]:38409 "EHLO mail-pl0-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932186AbeFGLHf (ORCPT ); Thu, 7 Jun 2018 07:07:35 -0400 Received: by mail-pl0-f68.google.com with SMTP id b14-v6so5927442pls.5 for ; Thu, 07 Jun 2018 04:07:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=MFl4EP+B8XV5a9PfDXfx8E5EQDotN4PEqm2HDvyX5eg=; b=WSa/dQMR2oriUESGX2pgy5XZ0yry4pn8WxPE8o2bYcHX4XdjpJH7sm3W3FXEYMDOQG XgMutS8XLIGCq9sqMxVFO7bi6YprX1/d6hs8t6G1OIcZnfDXNz3AT7fIKewgEUVbaxf8 HfGff77w7J4OoOQCBH1FMrWT02WYVzXZ4PwLo= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=MFl4EP+B8XV5a9PfDXfx8E5EQDotN4PEqm2HDvyX5eg=; b=uVZjK1auQj9q0bS3PXQbvmO2rDZVXPHhOzoC1zFeO8kn/fCKJLCB8Xm/GdK4zSSpAu rMXvN5+RFV1s+ZDpU+eTGeanRWQqnLLyLmcR68z37ykPJRL1yXSc7oaGmgtDodQ5mSvj LDu214mnSTyvtxmWXUHgmxF659Gd2bvuIjLYQyQPgDqjpry3KCyFswz9rSiGGKKKXEqX 0+5ILd6k0LAHS4mbRlUNNF1es5QHvVJP3BqLAypg6rRmqEXKNaNfGDmdPGUUnK/c4Myz NfDBmnABEg3tJSU99HaKXhVTMeowYhmo2Oi+zZx5FoQAwOOo0tka/g7hZbMuiDXS0Axu 6Lpg== X-Gm-Message-State: APt69E0ibKXjO65GZTlVySCFgz/YUBZB+KPiBa1Aak5Q5SawoWsjMTxv QCIp79x5dX30Rlk4Jee+YSe4Sh41o5IHm53wcY2GQg== X-Received: by 2002:a17:902:b18b:: with SMTP id s11-v6mr1594796plr.190.1528369654610; Thu, 07 Jun 2018 04:07:34 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:a17:90a:284b:0:0:0:0 with HTTP; Thu, 7 Jun 2018 04:07:33 -0700 (PDT) In-Reply-To: <1a021bf3-cf93-aa12-c5a8-1ea6c7900fbb@iogearbox.net> References: <20180413090351.25662-1-anders.roxell@linaro.org> <20180514115809.9803-1-anders.roxell@linaro.org> <1a021bf3-cf93-aa12-c5a8-1ea6c7900fbb@iogearbox.net> From: Anders Roxell Date: Thu, 7 Jun 2018 13:07:33 +0200 Message-ID: Subject: Re: [PATCH v3] selftests: add headers_install to lib.mk To: Daniel Borkmann Cc: Masahiro Yamada , Michal Marek , Shuah Khan , Bamvor Zhang , brgl@bgdev.pl, Paolo Bonzini , Andrew Morton , Mike Rapoport , aarcange@redhat.com, linux-kbuild@vger.kernel.org, Linux Kernel Mailing List , linux-kselftest@vger.kernel.org, Networking , alexei.starovoitov@gmail.com Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 14 May 2018 at 21:20, Daniel Borkmann wrote: > On 05/14/2018 01:58 PM, Anders Roxell wrote: >> If the kernel headers aren't installed we can't build all the tests. >> Add a new make target rule 'khdr' in the file lib.mk to generate the >> kernel headers and that gets include for every test-dir Makefile that >> includes lib.mk If the testdir in turn have its own sub-dirs the >> top_srcdir needs to be set to the linux-rootdir to be able to generate >> the kernel headers. >> >> Signed-off-by: Anders Roxell >> Reviewed-by: Fathi Boudra >> --- >> Makefile | 14 +------------- >> scripts/subarch.include | 13 +++++++++++++ >> tools/testing/selftests/android/Makefile | 2 +- >> tools/testing/selftests/android/ion/Makefile | 1 + >> tools/testing/selftests/bpf/Makefile | 5 ++--- >> tools/testing/selftests/futex/functional/Makefile | 1 + >> tools/testing/selftests/gpio/Makefile | 7 ++----- >> tools/testing/selftests/kvm/Makefile | 7 ++----- >> tools/testing/selftests/lib.mk | 10 ++++++++++ >> tools/testing/selftests/vm/Makefile | 4 ---- >> 10 files changed, 33 insertions(+), 31 deletions(-) >> create mode 100644 scripts/subarch.include > [...] >> diff --git a/tools/testing/selftests/bpf/Makefile b/tools/testing/selftests/bpf/Makefile >> index 438d4f93875b..9741609a0eb1 100644 >> --- a/tools/testing/selftests/bpf/Makefile >> +++ b/tools/testing/selftests/bpf/Makefile >> @@ -16,9 +16,8 @@ LDLIBS += -lcap -lelf -lrt -lpthread >> TEST_CUSTOM_PROGS = $(OUTPUT)/urandom_read >> all: $(TEST_CUSTOM_PROGS) >> >> -$(TEST_CUSTOM_PROGS): urandom_read >> - >> -urandom_read: urandom_read.c >> +$(TEST_CUSTOM_PROGS):| khdr >> +$(TEST_CUSTOM_PROGS): urandom_read.c >> $(CC) -o $(TEST_CUSTOM_PROGS) -static $< >> >> # Order correspond to 'make run_tests' order > > Can you elaborate on the error in BPF you're seeing that would force a > headers_install for it? BPF shouldn't be affected, a new revision of the patch does not touch the bpf/Makefile. I will send out a patch soon. Cheers, Anders > Some people are running the tools/ infrastructure > (incl. BPF kselftests) outside of kernel tree where this dependency would > break their setup. Why BPF bits cannot be fixed otherwise? > > Thanks, > Daniel