Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1216043
| From | Michael Ellerman <mpe@ellerman.id.au> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH 2/3] selftests: add membarrier syscall test |
| Date | 2015-08-31 09:00 +0200 |
| Message-ID | <q3rep-5o-3@gated-at.bofh.it> (permalink) |
| References | <pKNyO-2hl-5@gated-at.bofh.it> <pKNyO-2hl-9@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On Fri, 2015-07-10 at 16:58 -0400, Mathieu Desnoyers wrote: > From: Pranith Kumar <bobby.prani@gmail.com> > > This patch adds a self test for the membarrier system call. > > CC: Michael Ellerman <mpe@ellerman.id.au> Sorry I only just saw this due to some over zealous filtering on my end. > diff --git a/tools/testing/selftests/membarrier/Makefile b/tools/testing/selftests/membarrier/Makefile > new file mode 100644 > index 0000000..877a503 > --- /dev/null > +++ b/tools/testing/selftests/membarrier/Makefile > @@ -0,0 +1,11 @@ > +CFLAGS += -g -I../../../../usr/include/ > + > +all: > + $(CC) $(CFLAGS) membarrier_test.c -o membarrier_test > > +TEST_PROGS := membarrier_test You don't need to specify the rule, the implict one will do exactly the same, so you can just do: TEST_PROGS := membarrier_test all: $(TEST_PROGS) > diff --git a/tools/testing/selftests/membarrier/membarrier_test.c b/tools/testing/selftests/membarrier/membarrier_test.c > new file mode 100644 > index 0000000..3c9f217 > --- /dev/null > +++ b/tools/testing/selftests/membarrier/membarrier_test.c > @@ -0,0 +1,71 @@ > +#define _GNU_SOURCE > +#define __EXPORTED_HEADERS__ Why are you exporting that? I suspect to try and get around the "Attempt to use kernel headers from user space" warning. But you're correctly building against the installed headers, not the kernel headers, so you don't need to do that. > + > +#include <linux/membarrier.h> > +#include <asm-generic/unistd.h> This should just be <unistd.h> cheers -- 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 — 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