From mboxrd@z Thu Jan 1 00:00:00 1970 From: Mathieu Desnoyers Subject: [PATCH v2] Cleanup: membarrier selftest Date: Tue, 8 Sep 2015 15:21:59 -0400 Message-ID: <1441740119-24233-1-git-send-email-mathieu.desnoyers@efficios.com> Return-path: Sender: linux-api-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org To: Andrew Morton Cc: linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, Mathieu Desnoyers , Michael Ellerman , linux-api-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, Pranith Kumar , Shuah Khan List-Id: linux-api@vger.kernel.org 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 rather than the rather specific (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 rather than (the former header is located in a standard location and includes the latter). Signed-off-by: Mathieu Desnoyers CC: Michael Ellerman CC: Andrew Morton CC: linux-api-u79uwXL29TY76Z2rM5mHXA@public.gmane.org CC: Pranith Kumar CC: Shuah Khan -- 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 -#include -#include +#include #include #include #include -- 1.9.1