mirror of
https://github.com/hardkernel/linux.git
synced 2026-04-02 03:03:00 +09:00
[ Upstream commit46aa6a302b] linux/tools/testing/selftests/vm $ make gcc -Wall -I ../../../../usr/include compaction_test.c -lrt -o /compaction_test /usr/lib/gcc/x86_64-pc-linux-gnu/4.9.4/../../../../x86_64-pc-linux-gnu/bin/ld: cannot open output file /compaction_test: Permission denied collect2: error: ld returned 1 exit status make: *** [../lib.mk:54: /compaction_test] Error 1 Since commita8ba798bc8("selftests: enable O and KBUILD_OUTPUT") selftests/vm build fails if run from the "selftests/vm" directory, but it works in the selftests/ directory. It's quicker to be able to do a local vm-only build after a tree wipe and this patch allows for it again. Link: http://lkml.kernel.org/r/20170302173738.18994-4-aarcange@redhat.com Signed-off-by: Andrea Arcangeli <aarcange@redhat.com> Cc: Mike Rapoport <rppt@linux.vnet.ibm.com> Cc: "Dr. David Alan Gilbert" <dgilbert@redhat.com> Cc: Mike Kravetz <mike.kravetz@oracle.com> Cc: Pavel Emelyanov <xemul@parallels.com> Cc: Hillf Danton <hillf.zj@alibaba-inc.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> Signed-off-by: Sasha Levin <alexander.levin@verizon.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
38 lines
803 B
Makefile
38 lines
803 B
Makefile
# Makefile for vm selftests
|
|
|
|
ifndef OUTPUT
|
|
OUTPUT := $(shell pwd)
|
|
endif
|
|
|
|
CFLAGS = -Wall -I ../../../../usr/include $(EXTRA_CFLAGS)
|
|
BINARIES = compaction_test
|
|
BINARIES += hugepage-mmap
|
|
BINARIES += hugepage-shm
|
|
BINARIES += map_hugetlb
|
|
BINARIES += mlock2-tests
|
|
BINARIES += on-fault-limit
|
|
BINARIES += thuge-gen
|
|
BINARIES += transhuge-stress
|
|
BINARIES += userfaultfd
|
|
BINARIES += mlock-random-test
|
|
|
|
all: $(BINARIES)
|
|
%: %.c
|
|
$(CC) $(CFLAGS) -o $@ $^ -lrt
|
|
userfaultfd: userfaultfd.c ../../../../usr/include/linux/kernel.h
|
|
$(CC) $(CFLAGS) -O2 -o $@ $< -lpthread
|
|
|
|
mlock-random-test: mlock-random-test.c
|
|
$(CC) $(CFLAGS) -o $@ $< -lcap
|
|
|
|
../../../../usr/include/linux/kernel.h:
|
|
make -C ../../../.. headers_install
|
|
|
|
TEST_PROGS := run_vmtests
|
|
TEST_FILES := $(BINARIES)
|
|
|
|
include ../lib.mk
|
|
|
|
clean:
|
|
$(RM) $(BINARIES)
|