Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1221047
| Path | csiph.com!eternal-september.org!feeder.eternal-september.org!aioe.org!bofh.it!news.nic.it!robomod |
|---|---|
| From | Mathieu Desnoyers <mathieu.desnoyers@efficios.com> |
| Newsgroups | linux.kernel |
| Subject | [PATCH v2] Cleanup: membarrier selftest |
| Date | Tue, 08 Sep 2015 21:30:01 +0200 |
| Message-ID | <q6wKB-5c4-5@gated-at.bofh.it> (permalink) |
| X-Original-To | Andrew Morton <akpm@linux-foundation.org> |
| X-Mailer | git-send-email 2.1.4 |
| Sender | robomod@news.nic.it |
| List-ID | <linux-kernel.vger.kernel.org> |
| X-Mailing-List | linux-kernel@vger.kernel.org |
| Approved | robomod@news.nic.it |
| Lines | 69 |
| Organization | linux.* mail to news gateway |
| X-Original-Cc | linux-kernel@vger.kernel.org, Mathieu Desnoyers <mathieu.desnoyers@efficios.com>, Michael Ellerman <mpe@ellerman.id.au>, linux-api@vger.kernel.org, Pranith Kumar <bobby.prani@gmail.com>, Shuah Khan <shuahkh@osg.samsung.com> |
| X-Original-Date | Tue, 8 Sep 2015 15:21:59 -0400 |
| X-Original-Message-ID | <1441740119-24233-1-git-send-email-mathieu.desnoyers@efficios.com> |
| X-Original-Sender | linux-kernel-owner@vger.kernel.org |
| Xref | csiph.com linux.kernel:1221047 |
Show key headers only | View raw
As per Michael Ellerman's comments, we don't need to specify the rule in the Makefile, the implicit one will do the same. Also, the "__EXPORTED_HEADERS__" include is not needed, because we build the test against the installed kernel headers, not the kernel headers. Include <unistd.h> rather than the rather specific <asm-generic/unistd.h> (the former header is located in a standard location and includes the latter). My own cleanups: re-use "$(TEST_PROGS)" in the clean target rather than spelling the executable twice. Include <syscall.h> rather than <sys/syscall.h> (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 v1: - Add Changelog. --- 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/
Back to linux.kernel | Previous | Next — Next in thread | Find similar | Unroll thread
[PATCH v2] Cleanup: membarrier selftest Mathieu Desnoyers <mathieu.desnoyers@efficios.com> - 2015-09-08 21:30 +0200 Re: [PATCH v2] Cleanup: membarrier selftest Shuah Khan <shuahkh@osg.samsung.com> - 2015-09-08 21:40 +0200
csiph-web