diff options
author | Pranith Kumar <bobby.prani@gmail.com> | 2014-09-15 18:59:42 -0400 |
---|---|---|
committer | Shuah Khan <shuahkh@osg.samsung.com> | 2014-09-17 10:00:16 -0400 |
commit | ce6a144a0d01c6628496e4c0d18fbf3a0362cc67 (patch) | |
tree | dce362ce479f3dba9ca683e50bf3ad4c540cf27e /tools/testing | |
parent | 2ed36928373cc3dfb20a4d17042e9a6e05538e41 (diff) |
selftests/memfd: Run test on all architectures
Remove the dependence on x86 to run the memfd test. Verfied on 32-bit powerpc.
Signed-off-by: Pranith Kumar <bobby.prani@gmail.com>
Reviewed-by: David Herrmann <dh.herrmann@gmail.com>
Signed-off-by: Shuah Khan <shuahkh@osg.samsung.com>
Diffstat (limited to 'tools/testing')
-rw-r--r-- | tools/testing/selftests/memfd/Makefile | 21 |
1 files changed, 0 insertions, 21 deletions
diff --git a/tools/testing/selftests/memfd/Makefile b/tools/testing/selftests/memfd/Makefile index ad4ab01cd28f..b80cd10d53ba 100644 --- a/tools/testing/selftests/memfd/Makefile +++ b/tools/testing/selftests/memfd/Makefile | |||
@@ -1,38 +1,17 @@ | |||
1 | uname_M := $(shell uname -m 2>/dev/null || echo not) | ||
2 | ARCH ?= $(shell echo $(uname_M) | sed -e s/i.86/i386/) | ||
3 | ifeq ($(ARCH),i386) | ||
4 | ARCH := x86 | ||
5 | endif | ||
6 | ifeq ($(ARCH),x86_64) | ||
7 | ARCH := x86 | ||
8 | endif | ||
9 | |||
10 | CFLAGS += -D_FILE_OFFSET_BITS=64 | 1 | CFLAGS += -D_FILE_OFFSET_BITS=64 |
11 | CFLAGS += -I../../../../arch/x86/include/generated/uapi/ | ||
12 | CFLAGS += -I../../../../arch/x86/include/uapi/ | ||
13 | CFLAGS += -I../../../../include/uapi/ | 2 | CFLAGS += -I../../../../include/uapi/ |
14 | CFLAGS += -I../../../../include/ | 3 | CFLAGS += -I../../../../include/ |
15 | 4 | ||
16 | all: | 5 | all: |
17 | ifeq ($(ARCH),x86) | ||
18 | gcc $(CFLAGS) memfd_test.c -o memfd_test | 6 | gcc $(CFLAGS) memfd_test.c -o memfd_test |
19 | else | ||
20 | echo "Not an x86 target, can't build memfd selftest" | ||
21 | endif | ||
22 | 7 | ||
23 | run_tests: all | 8 | run_tests: all |
24 | ifeq ($(ARCH),x86) | ||
25 | gcc $(CFLAGS) memfd_test.c -o memfd_test | 9 | gcc $(CFLAGS) memfd_test.c -o memfd_test |
26 | endif | ||
27 | @./memfd_test || echo "memfd_test: [FAIL]" | 10 | @./memfd_test || echo "memfd_test: [FAIL]" |
28 | 11 | ||
29 | build_fuse: | 12 | build_fuse: |
30 | ifeq ($(ARCH),x86) | ||
31 | gcc $(CFLAGS) fuse_mnt.c `pkg-config fuse --cflags --libs` -o fuse_mnt | 13 | gcc $(CFLAGS) fuse_mnt.c `pkg-config fuse --cflags --libs` -o fuse_mnt |
32 | gcc $(CFLAGS) fuse_test.c -o fuse_test | 14 | gcc $(CFLAGS) fuse_test.c -o fuse_test |
33 | else | ||
34 | echo "Not an x86 target, can't build memfd selftest" | ||
35 | endif | ||
36 | 15 | ||
37 | run_fuse: build_fuse | 16 | run_fuse: build_fuse |
38 | @./run_fuse_test.sh || echo "fuse_test: [FAIL]" | 17 | @./run_fuse_test.sh || echo "fuse_test: [FAIL]" |