aboutsummaryrefslogtreecommitdiffstats
path: root/tools/testing
diff options
context:
space:
mode:
authorPranith Kumar <bobby.prani@gmail.com>2014-09-15 18:59:42 -0400
committerShuah Khan <shuahkh@osg.samsung.com>2014-09-17 10:00:16 -0400
commitce6a144a0d01c6628496e4c0d18fbf3a0362cc67 (patch)
treedce362ce479f3dba9ca683e50bf3ad4c540cf27e /tools/testing
parent2ed36928373cc3dfb20a4d17042e9a6e05538e41 (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/Makefile21
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 @@
1uname_M := $(shell uname -m 2>/dev/null || echo not)
2ARCH ?= $(shell echo $(uname_M) | sed -e s/i.86/i386/)
3ifeq ($(ARCH),i386)
4 ARCH := x86
5endif
6ifeq ($(ARCH),x86_64)
7 ARCH := x86
8endif
9
10CFLAGS += -D_FILE_OFFSET_BITS=64 1CFLAGS += -D_FILE_OFFSET_BITS=64
11CFLAGS += -I../../../../arch/x86/include/generated/uapi/
12CFLAGS += -I../../../../arch/x86/include/uapi/
13CFLAGS += -I../../../../include/uapi/ 2CFLAGS += -I../../../../include/uapi/
14CFLAGS += -I../../../../include/ 3CFLAGS += -I../../../../include/
15 4
16all: 5all:
17ifeq ($(ARCH),x86)
18 gcc $(CFLAGS) memfd_test.c -o memfd_test 6 gcc $(CFLAGS) memfd_test.c -o memfd_test
19else
20 echo "Not an x86 target, can't build memfd selftest"
21endif
22 7
23run_tests: all 8run_tests: all
24ifeq ($(ARCH),x86)
25 gcc $(CFLAGS) memfd_test.c -o memfd_test 9 gcc $(CFLAGS) memfd_test.c -o memfd_test
26endif
27 @./memfd_test || echo "memfd_test: [FAIL]" 10 @./memfd_test || echo "memfd_test: [FAIL]"
28 11
29build_fuse: 12build_fuse:
30ifeq ($(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
33else
34 echo "Not an x86 target, can't build memfd selftest"
35endif
36 15
37run_fuse: build_fuse 16run_fuse: build_fuse
38 @./run_fuse_test.sh || echo "fuse_test: [FAIL]" 17 @./run_fuse_test.sh || echo "fuse_test: [FAIL]"