linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Daniel Borkmann <daniel@iogearbox.net>
To: Anders Roxell <anders.roxell@linaro.org>,
	yamada.masahiro@socionext.com, michal.lkml@markovi.net,
	shuah@kernel.org, bamv2005@gmail.com, brgl@bgdev.pl,
	pbonzini@redhat.com, akpm@linux-foundation.org,
	rppt@linux.vnet.ibm.com, aarcange@redhat.com
Cc: linux-kbuild@vger.kernel.org, linux-kernel@vger.kernel.org,
	linux-kselftest@vger.kernel.org, netdev@vger.kernel.org,
	alexei.starovoitov@gmail.com
Subject: Re: [PATCH v3] selftests: add headers_install to lib.mk
Date: Mon, 14 May 2018 21:20:24 +0200	[thread overview]
Message-ID: <1a021bf3-cf93-aa12-c5a8-1ea6c7900fbb@iogearbox.net> (raw)
In-Reply-To: <20180514115809.9803-1-anders.roxell@linaro.org>

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 <anders.roxell@linaro.org>
> Reviewed-by: Fathi Boudra <fathi.boudra@linaro.org>
> ---
>  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? 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

  parent reply	other threads:[~2018-05-14 19:20 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-04-12 10:23 [PATCH] selftests: add headers_install to lib.mk Anders Roxell
2018-04-13  9:03 ` [PATCH v2] " Anders Roxell
2018-05-14 11:58   ` [PATCH v3] " Anders Roxell
2018-05-14 17:16     ` Paolo Bonzini
2018-05-14 18:44     ` Mike Rapoport
2018-05-14 19:20     ` Daniel Borkmann [this message]
2018-06-07 11:07       ` Anders Roxell
2018-06-07 11:09   ` [PATCH v4] " Anders Roxell
2018-07-23 20:49     ` Anders Roxell
2018-07-24 17:10       ` Shuah Khan
2018-07-25 16:08         ` Anders Roxell
2018-08-06 17:03           ` Shuah Khan
2018-08-07  2:32             ` Masahiro Yamada
2018-08-08 10:44               ` Anders Roxell
2019-01-04 13:15                 ` Geert Uytterhoeven
2018-08-09  8:04             ` [PATCH v5] " Anders Roxell
2018-09-04 10:47               ` [PATCH v6] " Anders Roxell
2018-09-05 14:13                 ` Shuah Khan
2018-09-28  4:52                 ` Michael Ellerman
2018-09-28 13:52                   ` Shuah Khan
2018-10-02 14:12                     ` Michael Ellerman

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1a021bf3-cf93-aa12-c5a8-1ea6c7900fbb@iogearbox.net \
    --to=daniel@iogearbox.net \
    --cc=aarcange@redhat.com \
    --cc=akpm@linux-foundation.org \
    --cc=alexei.starovoitov@gmail.com \
    --cc=anders.roxell@linaro.org \
    --cc=bamv2005@gmail.com \
    --cc=brgl@bgdev.pl \
    --cc=linux-kbuild@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-kselftest@vger.kernel.org \
    --cc=michal.lkml@markovi.net \
    --cc=netdev@vger.kernel.org \
    --cc=pbonzini@redhat.com \
    --cc=rppt@linux.vnet.ibm.com \
    --cc=shuah@kernel.org \
    --cc=yamada.masahiro@socionext.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).