Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1218385
| From | Mathieu Desnoyers <mathieu.desnoyers@efficios.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH 2/3] selftests: add membarrier syscall test |
| Date | 2015-09-03 18:00 +0200 |
| Message-ID | <q4F5D-83m-1@gated-at.bofh.it> (permalink) |
| References | (1 earlier) <pKNyO-2hl-9@gated-at.bofh.it> <q3rep-5o-3@gated-at.bofh.it> <q3XnY-4ya-5@gated-at.bofh.it> <q3YDn-6fB-3@gated-at.bofh.it> <q4z9U-84h-17@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
----- 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 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Re: [PATCH 2/3] selftests: add membarrier syscall test Michael Ellerman <mpe@ellerman.id.au> - 2015-08-31 09:00 +0200
Re: [PATCH 2/3] selftests: add membarrier syscall test Mathieu Desnoyers <mathieu.desnoyers@efficios.com> - 2015-09-01 19:20 +0200
Re: [PATCH 2/3] selftests: add membarrier syscall test Andy Lutomirski <luto@amacapital.net> - 2015-09-01 20:40 +0200
Re: [PATCH 2/3] selftests: add membarrier syscall test Michael Ellerman <mpe@ellerman.id.au> - 2015-09-03 11:40 +0200
Re: [PATCH 2/3] selftests: add membarrier syscall test Mathieu Desnoyers <mathieu.desnoyers@efficios.com> - 2015-09-03 18:00 +0200
Re: [PATCH 2/3] selftests: add membarrier syscall test Michael Ellerman <mpe@ellerman.id.au> - 2015-09-04 05:40 +0200
Re: [PATCH 2/3] selftests: add membarrier syscall test Michael Ellerman <mpe@ellerman.id.au> - 2015-09-03 11:30 +0200
csiph-web