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,
Pranith Kumar <bobby.prani@gmail.com>
Subject: Re: [PATCH 2/2] selftests: Add membarrier syscall test
Date: Tue, 05 May 2015 10:36:40 +1000 [thread overview]
Message-ID: <1430786200.13561.4.camel@ellerman.id.au> (raw)
In-Reply-To: <1430773213-8981-3-git-send-email-mathieu.desnoyers@efficios.com>
On Mon, 2015-05-04 at 17:00 -0400, Mathieu Desnoyers wrote:
> From: Pranith Kumar <bobby.prani@gmail.com>
>
> This commit adds a selftest for the membarrier system call.
>
> diff --git a/tools/testing/selftests/membarrier/.gitignore b/tools/testing/selftests/membarrier/.gitignore
> new file mode 100644
> index 0000000..020c44f4
> --- /dev/null
> +++ b/tools/testing/selftests/membarrier/.gitignore
> @@ -0,0 +1 @@
> +membarrier_test
> diff --git a/tools/testing/selftests/membarrier/Makefile b/tools/testing/selftests/membarrier/Makefile
> new file mode 100644
> index 0000000..752b719
> --- /dev/null
> +++ b/tools/testing/selftests/membarrier/Makefile
> @@ -0,0 +1,13 @@
> +CFLAGS += -g -D_FILE_OFFSET_BITS=64
> +CFLAGS += -I../../../../include/uapi/
> +CFLAGS += -I../../../../include/
Don't include the kernel headers, this is userspace.
If you want to include the exported headers that would be good, they are in
../../../../usr/include by default.
> +all:
> + gcc $(CFLAGS) membarrier_test.c -o membarrier_test
> +
> +run_tests: all
> + gcc $(CFLAGS) membarrier_test.c -o membarrier_test
> + @./membarrier_test || echo "membarrier_test: [FAIL]"
> +
> +clean:
> + $(RM) membarrier_test
Can you please use lib.mk, it will do most of this for you, will support cross
compilation, and install support as well.
cheers
next prev parent reply other threads:[~2015-05-05 0:36 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-05-04 21:00 [PATCH v17 for 4.2 0/2] sys_membarrier() Mathieu Desnoyers
2015-05-04 21:00 ` [PATCH v17 1/2] sys_membarrier(): system-wide memory barrier (generic, x86) Mathieu Desnoyers
2015-05-04 21:30 ` josh
2015-05-05 18:25 ` Mathieu Desnoyers
2015-05-05 23:11 ` josh
2015-05-05 5:56 ` Michael Kerrisk (man-pages)
2015-05-04 21:00 ` [PATCH 2/2] selftests: Add membarrier syscall test Mathieu Desnoyers
2015-05-05 0:36 ` Michael Ellerman [this message]
2015-05-06 19:08 ` Mathieu Desnoyers
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=1430786200.13561.4.camel@ellerman.id.au \
--to=mpe@ellerman.id.au \
--cc=akpm@linux-foundation.org \
--cc=bobby.prani@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mathieu.desnoyers@efficios.com \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox