Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1221081 > unrolled thread
| Started by | Mathieu Desnoyers <mathieu.desnoyers@efficios.com> |
|---|---|
| First post | 2015-09-08 23:00 +0200 |
| Last post | 2015-09-09 10:40 +0200 |
| Articles | 2 — 2 participants |
Back to article view | Back to linux.kernel
[PATCH v3] Cleanup: membarrier selftest Mathieu Desnoyers <mathieu.desnoyers@efficios.com> - 2015-09-08 23:00 +0200
Re: [PATCH v3] Cleanup: membarrier selftest Michael Ellerman <mpe@ellerman.id.au> - 2015-09-09 10:40 +0200
| From | Mathieu Desnoyers <mathieu.desnoyers@efficios.com> |
|---|---|
| Date | 2015-09-08 23:00 +0200 |
| Subject | [PATCH v3] Cleanup: membarrier selftest |
| Message-ID | <q6y9I-76u-3@gated-at.bofh.it> |
We don't need to specify an explicit rule in the Makefile, the implicit one will do the same. The "__EXPORTED_HEADERS__" define is not needed, because we build the test against the installed kernel headers, not the in-tree kernel headers. Re-use "$(TEST_PROGS)" in the clean target rather than spelling the executable name twice. Include <unistd.h> rather than the rather specific <asm-generic/unistd.h>. Include <syscall.h> rather than <sys/syscall.h>. In both cases, the former header is located in a standard location and includes the latter. Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com> CC: Michael Ellerman <mpe@ellerman.id.au> CC: Andrew Morton <akpm@linux-foundation.org> CC: linux-api@vger.kernel.org CC: Pranith Kumar <bobby.prani@gmail.com> CC: Shuah Khan <shuahkh@osg.samsung.com> -- Changes since v2: - Refine Changelog, removing references to comments, taking care of comments from Shuah Khan. Changes since v1: - Add Changelog. Changes since RFC: - Take care of comments from Michael Ellerman. --- tools/testing/selftests/membarrier/Makefile | 7 +++---- tools/testing/selftests/membarrier/membarrier_test.c | 5 +---- 2 files changed, 4 insertions(+), 8 deletions(-) diff --git a/tools/testing/selftests/membarrier/Makefile b/tools/testing/selftests/membarrier/Makefile index 877a503..a1a9708 100644 --- a/tools/testing/selftests/membarrier/Makefile +++ b/tools/testing/selftests/membarrier/Makefile @@ -1,11 +1,10 @@ CFLAGS += -g -I../../../../usr/include/ -all: - $(CC) $(CFLAGS) membarrier_test.c -o membarrier_test - TEST_PROGS := membarrier_test +all: $(TEST_PROGS) + include ../lib.mk clean: - $(RM) membarrier_test + $(RM) $(TEST_PROGS) diff --git a/tools/testing/selftests/membarrier/membarrier_test.c b/tools/testing/selftests/membarrier/membarrier_test.c index dde3125..535f0fe 100644 --- a/tools/testing/selftests/membarrier/membarrier_test.c +++ b/tools/testing/selftests/membarrier/membarrier_test.c @@ -1,9 +1,6 @@ #define _GNU_SOURCE -#define __EXPORTED_HEADERS__ - #include <linux/membarrier.h> -#include <asm-generic/unistd.h> -#include <sys/syscall.h> +#include <syscall.h> #include <stdio.h> #include <errno.h> #include <string.h> -- 1.9.1 -- 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/
[toc] | [next] | [standalone]
| From | Michael Ellerman <mpe@ellerman.id.au> |
|---|---|
| Date | 2015-09-09 10:40 +0200 |
| Message-ID | <q6J58-6bW-15@gated-at.bofh.it> |
| In reply to | #1221081 |
On Tue, 2015-09-08 at 16:58 -0400, Mathieu Desnoyers wrote: > We don't need to specify an explicit rule in the Makefile, the implicit > one will do the same. The "__EXPORTED_HEADERS__" define is not needed, > because we build the test against the installed kernel headers, not the > in-tree kernel headers. Re-use "$(TEST_PROGS)" in the clean target > rather than spelling the executable name twice. Include <unistd.h> > rather than the rather specific <asm-generic/unistd.h>. Include > <syscall.h> rather than <sys/syscall.h>. In both cases, the former > header is located in a standard location and includes the latter. > > Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com> > CC: Michael Ellerman <mpe@ellerman.id.au> > CC: Andrew Morton <akpm@linux-foundation.org> > CC: linux-api@vger.kernel.org > CC: Pranith Kumar <bobby.prani@gmail.com> > CC: Shuah Khan <shuahkh@osg.samsung.com> > -- > Changes since v2: > - Refine Changelog, removing references to comments, taking care > of comments from Shuah Khan. > Changes since v1: > - Add Changelog. > Changes since RFC: > - Take care of comments from Michael Ellerman. Looks great, thanks. Acked-by: Michael Ellerman <mpe@ellerman.id.au> 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/
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web