[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Tue, 05 May 2015 10:36:40 +1000
From: Michael Ellerman <mpe@...erman.id.au>
To: Mathieu Desnoyers <mathieu.desnoyers@...icios.com>
Cc: Andrew Morton <akpm@...ux-foundation.org>,
linux-kernel@...r.kernel.org, Pranith Kumar <bobby.prani@...il.com>
Subject: Re: [PATCH 2/2] selftests: Add membarrier syscall test
On Mon, 2015-05-04 at 17:00 -0400, Mathieu Desnoyers wrote:
> From: Pranith Kumar <bobby.prani@...il.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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists