From: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
To: Michael Ellerman <mpe@ellerman.id.au>
Cc: Andy Lutomirski <luto@amacapital.net>,
Andrew Morton <akpm@linux-foundation.org>,
linux-kernel@vger.kernel.org,
linux-api <linux-api@vger.kernel.org>,
Pranith Kumar <bobby.prani@gmail.com>
Subject: Re: [PATCH 2/3] selftests: add membarrier syscall test
Date: Thu, 3 Sep 2015 15:47:13 +0000 (UTC) [thread overview]
Message-ID: <1734164155.35899.1441295233847.JavaMail.zimbra@efficios.com> (raw)
In-Reply-To: <1441272839.26379.2.camel@ellerman.id.au>
----- On Sep 3, 2015, at 5:33 AM, Michael Ellerman mpe@ellerman.id.au wrote:
> On Tue, 2015-09-01 at 11:32 -0700, Andy Lutomirski wrote:
>> On Tue, Sep 1, 2015 at 10:11 AM, Mathieu Desnoyers
>> <mathieu.desnoyers@efficios.com> wrote:
>> > Just to make sure I understand: should we expect that
>> > everyone will issue "make headers_install" on their system
>> > before doing a make kselftest ?
>> >
>> > I see that a few selftests (e.g. memfd) are adding the
>> > source tree include paths to the compiler include paths,
>> > which I guess is to ensure that the kselftest will
>> > work even if the system headers are not up to date.
>>
>> It would be really nice if there were a clean way for selftests to
>> include the kernel headers.
>
> What's wrong with make headers_install?
>
> Or do you mean when writing the tests? That we could fix by adding the
> ../../../../usr/include path to CFLAGS in lib.mk. And fixing all the tests that
> overwrite CFLAGS to append to CFLAGS.
>
>> Perhaps make should build the exportable headers somewhere as a dependency of
>> kselftests.
>
> Yeah the top-level kselftest target could do that I think.
>
> Folks who don't want the headers installed can just run the selftests Makefile
> directly.
>
> Does this work for you?
>
> diff --git a/Makefile b/Makefile
> index c361593..c8841d3 100644
> --- a/Makefile
> +++ b/Makefile
> @@ -1080,7 +1080,7 @@ headers_check: headers_install
> # Kernel selftest
>
> PHONY += kselftest
> -kselftest:
> +kselftest: headers_install
> $(Q)$(MAKE) -C tools/testing/selftests run_tests
My personal experience is that make headers_install
does not necessarily play well with the distribution
header file hierarchy, which requires some tweaks
to be done by the users (e.g. asm vs x86_64-linux-gnu).
Also, headers_install typically expects a INSTALL_HDR_PATH.
It would be interesting if we could install the kernel
headers into a specific location that is then re-used by
kselftest, so using it without too much manual configuration
does not require to overwrite the distribution header files
to run tests.
Thoughts ?
Thanks,
Mathieu
>
> # ---------------------------------------------------------------------------
>
> cheers
--
Mathieu Desnoyers
EfficiOS Inc.
http://www.efficios.com
next prev parent reply other threads:[~2015-09-03 15:56 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-07-10 20:58 [PATCH 0/3] sys_membarrier (x86, generic) Mathieu Desnoyers
2015-07-10 20:58 ` [PATCH 1/3 v19] sys_membarrier(): system-wide memory barrier (generic, x86) Mathieu Desnoyers
2015-12-04 15:44 ` Michael Kerrisk (man-pages)
2015-12-05 8:48 ` Mathieu Desnoyers
2015-12-11 18:05 ` Michael Kerrisk (man-pages)
2015-12-13 11:44 ` Mathieu Desnoyers
2015-07-10 20:58 ` [PATCH 2/3] selftests: add membarrier syscall test Mathieu Desnoyers
2015-08-31 6:54 ` Michael Ellerman
2015-09-01 17:11 ` Mathieu Desnoyers
2015-09-01 18:32 ` Andy Lutomirski
2015-09-03 9:33 ` Michael Ellerman
2015-09-03 15:47 ` Mathieu Desnoyers [this message]
2015-09-04 3:36 ` Michael Ellerman
2015-09-07 16:01 ` Mathieu Desnoyers
2015-09-08 4:19 ` Michael Ellerman
2015-09-08 14:02 ` Mathieu Desnoyers
2015-09-03 9:24 ` Michael Ellerman
2015-07-10 20:58 ` [PATCH 3/3] selftests: enhance " Mathieu Desnoyers
2015-10-05 23:21 ` [PATCH 0/3] sys_membarrier (x86, generic) Rusty Russell
2015-10-06 2:17 ` Mathieu Desnoyers
2015-10-08 6:22 ` Rusty Russell
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=1734164155.35899.1441295233847.JavaMail.zimbra@efficios.com \
--to=mathieu.desnoyers@efficios.com \
--cc=akpm@linux-foundation.org \
--cc=bobby.prani@gmail.com \
--cc=linux-api@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=luto@amacapital.net \
--cc=mpe@ellerman.id.au \
/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
Powered by JetHome