All of lore.kernel.org
 help / color / mirror / Atom feed
From: Michael Ellerman <mpe-Gsx/Oe8HsFggBc27wqDAHg@public.gmane.org>
To: Mathieu Desnoyers
	<mathieu.desnoyers-vg+e7yoeK/dWk0Htik3J/w@public.gmane.org>
Cc: Andrew Morton
	<akpm-de/tnXTf+JLsfHDXvbKv3WD2FQJk+8+b@public.gmane.org>,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	linux-api-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	Pranith Kumar
	<bobby.prani-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
Subject: Re: [PATCH 2/3] selftests: add membarrier syscall test
Date: Mon, 31 Aug 2015 16:54:00 +1000	[thread overview]
Message-ID: <1441004040.5735.7.camel@ellerman.id.au> (raw)
In-Reply-To: <1436561912-24365-3-git-send-email-mathieu.desnoyers-vg+e7yoeK/dWk0Htik3J/w@public.gmane.org>

On Fri, 2015-07-10 at 16:58 -0400, Mathieu Desnoyers wrote:
> From: Pranith Kumar <bobby.prani-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
> 
> This patch adds a self test for the membarrier system call.
> 
> CC: Michael Ellerman <mpe-Gsx/Oe8HsFggBc27wqDAHg@public.gmane.org>

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

WARNING: multiple messages have this Message-ID (diff)
From: Michael Ellerman <mpe@ellerman.id.au>
To: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Cc: Andrew Morton <akpm@linux-foundation.org>,
	linux-kernel@vger.kernel.org, linux-api@vger.kernel.org,
	Pranith Kumar <bobby.prani@gmail.com>
Subject: Re: [PATCH 2/3] selftests: add membarrier syscall test
Date: Mon, 31 Aug 2015 16:54:00 +1000	[thread overview]
Message-ID: <1441004040.5735.7.camel@ellerman.id.au> (raw)
In-Reply-To: <1436561912-24365-3-git-send-email-mathieu.desnoyers@efficios.com>

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



  parent reply	other threads:[~2015-08-31  6:54 UTC|newest]

Thread overview: 35+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-07-10 20:58 [PATCH 0/3] sys_membarrier (x86, generic) Mathieu Desnoyers
2015-07-10 20:58 ` [PATCH 1/3 v19] sys_membarrier(): system-wide memory barrier (generic, x86) Mathieu Desnoyers
2015-12-04 15:44   ` Michael Kerrisk (man-pages)
     [not found]     ` <5661B4E8.2070801-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2015-12-05  8:48       ` Mathieu Desnoyers
2015-12-05  8:48         ` Mathieu Desnoyers
     [not found]         ` <1635187109.213051.1449305303824.JavaMail.zimbra-vg+e7yoeK/dWk0Htik3J/w@public.gmane.org>
2015-12-11 18:05           ` Michael Kerrisk (man-pages)
2015-12-11 18:05             ` Michael Kerrisk (man-pages)
     [not found]             ` <566B107D.802-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2015-12-13 11:44               ` Mathieu Desnoyers
2015-12-13 11:44                 ` Mathieu Desnoyers
2015-07-10 20:58 ` [PATCH 2/3] selftests: add membarrier syscall test Mathieu Desnoyers
     [not found]   ` <1436561912-24365-3-git-send-email-mathieu.desnoyers-vg+e7yoeK/dWk0Htik3J/w@public.gmane.org>
2015-08-31  6:54     ` Michael Ellerman [this message]
2015-08-31  6:54       ` Michael Ellerman
     [not found]       ` <1441004040.5735.7.camel-Gsx/Oe8HsFggBc27wqDAHg@public.gmane.org>
2015-09-01 17:11         ` Mathieu Desnoyers
2015-09-01 17:11           ` Mathieu Desnoyers
     [not found]           ` <1071313434.33305.1441127478843.JavaMail.zimbra-vg+e7yoeK/dWk0Htik3J/w@public.gmane.org>
2015-09-01 18:32             ` Andy Lutomirski
2015-09-01 18:32               ` Andy Lutomirski
2015-09-03  9:33               ` Michael Ellerman
     [not found]                 ` <1441272839.26379.2.camel-Gsx/Oe8HsFggBc27wqDAHg@public.gmane.org>
2015-09-03 15:47                   ` Mathieu Desnoyers
2015-09-03 15:47                     ` Mathieu Desnoyers
     [not found]                     ` <1734164155.35899.1441295233847.JavaMail.zimbra-vg+e7yoeK/dWk0Htik3J/w@public.gmane.org>
2015-09-04  3:36                       ` Michael Ellerman
2015-09-04  3:36                         ` Michael Ellerman
2015-09-07 16:01                         ` Mathieu Desnoyers
     [not found]                           ` <2098747118.39146.1441641706942.JavaMail.zimbra-vg+e7yoeK/dWk0Htik3J/w@public.gmane.org>
2015-09-08  4:19                             ` Michael Ellerman
2015-09-08  4:19                               ` Michael Ellerman
     [not found]                               ` <1441685994.14597.7.camel-Gsx/Oe8HsFggBc27wqDAHg@public.gmane.org>
2015-09-08 14:02                                 ` Mathieu Desnoyers
2015-09-08 14:02                                   ` Mathieu Desnoyers
2015-09-03  9:24             ` Michael Ellerman
2015-09-03  9:24               ` Michael Ellerman
2015-07-10 20:58 ` [PATCH 3/3] selftests: enhance " Mathieu Desnoyers
     [not found] ` <1436561912-24365-1-git-send-email-mathieu.desnoyers-vg+e7yoeK/dWk0Htik3J/w@public.gmane.org>
2015-10-05 23:21   ` [PATCH 0/3] sys_membarrier (x86, generic) Rusty Russell
2015-10-05 23:21     ` Rusty Russell
     [not found]     ` <87vbaknbp8.fsf-8n+1lVoiYb80n/F98K4Iww@public.gmane.org>
2015-10-06  2:17       ` Mathieu Desnoyers
2015-10-06  2:17         ` Mathieu Desnoyers
     [not found]         ` <1840779213.18838.1444097856879.JavaMail.zimbra-vg+e7yoeK/dWk0Htik3J/w@public.gmane.org>
2015-10-08  6:22           ` Rusty Russell
2015-10-08  6:22             ` Rusty Russell

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1441004040.5735.7.camel@ellerman.id.au \
    --to=mpe-gsx/oe8hsfggbc27wqdahg@public.gmane.org \
    --cc=akpm-de/tnXTf+JLsfHDXvbKv3WD2FQJk+8+b@public.gmane.org \
    --cc=bobby.prani-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
    --cc=linux-api-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=mathieu.desnoyers-vg+e7yoeK/dWk0Htik3J/w@public.gmane.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.