diff options
Diffstat (limited to 'kernel/tools/testing/selftests/memfd')
-rw-r--r-- | kernel/tools/testing/selftests/memfd/Makefile | 12 | ||||
-rw-r--r-- | kernel/tools/testing/selftests/memfd/memfd_test.c | 3 | ||||
-rwxr-xr-x[-rw-r--r--] | kernel/tools/testing/selftests/memfd/run_fuse_test.sh | 0 |
3 files changed, 8 insertions, 7 deletions
diff --git a/kernel/tools/testing/selftests/memfd/Makefile b/kernel/tools/testing/selftests/memfd/Makefile index 3e7eb7972..fd396ac81 100644 --- a/kernel/tools/testing/selftests/memfd/Makefile +++ b/kernel/tools/testing/selftests/memfd/Makefile @@ -4,16 +4,16 @@ CFLAGS += -I../../../../include/uapi/ CFLAGS += -I../../../../include/ CFLAGS += -I../../../../usr/include/ -all: - $(CC) $(CFLAGS) memfd_test.c -o memfd_test - TEST_PROGS := memfd_test +all: $(TEST_PROGS) + include ../lib.mk -build_fuse: - $(CC) $(CFLAGS) fuse_mnt.c `pkg-config fuse --cflags --libs` -o fuse_mnt - $(CC) $(CFLAGS) fuse_test.c -o fuse_test +build_fuse: fuse_mnt fuse_test + +fuse_mnt.o: CFLAGS += $(shell pkg-config fuse --cflags) +fuse_mnt: LDFLAGS += $(shell pkg-config fuse --libs) run_fuse: build_fuse @./run_fuse_test.sh || echo "fuse_test: [FAIL]" diff --git a/kernel/tools/testing/selftests/memfd/memfd_test.c b/kernel/tools/testing/selftests/memfd/memfd_test.c index 0b9eafb7a..26546892c 100644 --- a/kernel/tools/testing/selftests/memfd/memfd_test.c +++ b/kernel/tools/testing/selftests/memfd/memfd_test.c @@ -15,10 +15,11 @@ #include <sys/mman.h> #include <sys/stat.h> #include <sys/syscall.h> +#include <sys/wait.h> #include <unistd.h> #define MFD_DEF_SIZE 8192 -#define STACK_SIZE 65535 +#define STACK_SIZE 65536 static int sys_memfd_create(const char *name, unsigned int flags) diff --git a/kernel/tools/testing/selftests/memfd/run_fuse_test.sh b/kernel/tools/testing/selftests/memfd/run_fuse_test.sh index 69b930e1e..69b930e1e 100644..100755 --- a/kernel/tools/testing/selftests/memfd/run_fuse_test.sh +++ b/kernel/tools/testing/selftests/memfd/run_fuse_test.sh |