Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752596AbbHaGyE (ORCPT ); Mon, 31 Aug 2015 02:54:04 -0400 Received: from ozlabs.org ([103.22.144.67]:58533 "EHLO ozlabs.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752122AbbHaGyC (ORCPT ); Mon, 31 Aug 2015 02:54:02 -0400 Message-ID: <1441004040.5735.7.camel@ellerman.id.au> Subject: Re: [PATCH 2/3] selftests: add membarrier syscall test From: Michael Ellerman To: Mathieu Desnoyers Cc: Andrew Morton , linux-kernel@vger.kernel.org, linux-api@vger.kernel.org, Pranith Kumar Date: Mon, 31 Aug 2015 16:54:00 +1000 In-Reply-To: <1436561912-24365-3-git-send-email-mathieu.desnoyers@efficios.com> References: <1436561912-24365-1-git-send-email-mathieu.desnoyers@efficios.com> <1436561912-24365-3-git-send-email-mathieu.desnoyers@efficios.com> Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.12.11-0ubuntu3 Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1754 Lines: 61 On Fri, 2015-07-10 at 16:58 -0400, Mathieu Desnoyers wrote: > From: Pranith Kumar > > This patch adds a self test for the membarrier system call. > > CC: Michael Ellerman 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 > +#include This should just be 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/