Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

selftests/futex: Update Makefile to use lib.mk

Adapt the futextest Makefiles to use lib.mk macros for RUN_TESTS and
EMIT_TESTS. For now, we reuse the run.sh mechanism provided by
futextest. This doesn't provide the standard selftests: [PASS|FAIL]
format, but the tests provide very similar output already.

This results in the run_kselftest.sh script for futexes including a
single line: ./run.sh

Cc: Shuah Khan <shuahkh@osg.samsung.com>
Cc: linux-api@vger.kernel.org
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Davidlohr Bueso <dave@stgolabs.net>
Cc: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
Signed-off-by: Darren Hart <dvhart@linux.intel.com>
Signed-off-by: Shuah Khan <shuahkh@osg.samsung.com>

authored by

Darren Hart and committed by
Shuah Khan
9705315b 2aa8470f

+22 -3
+19 -1
tools/testing/selftests/futex/Makefile
··· 1 1 SUBDIRS := functional 2 2 3 + TEST_PROGS := run.sh 4 + 3 5 .PHONY: all clean 4 6 all: 5 7 for DIR in $(SUBDIRS); do $(MAKE) -C $$DIR $@ ; done 6 8 7 - run_tests: all 9 + include ../lib.mk 10 + 11 + override define RUN_TESTS 8 12 ./run.sh 13 + endef 14 + 15 + override define INSTALL_RULE 16 + mkdir -p $(INSTALL_PATH) 17 + install -t $(INSTALL_PATH) $(TEST_PROGS) $(TEST_PROGS_EXTENDED) $(TEST_FILES) 18 + 19 + @for SUBDIR in $(SUBDIRS); do \ 20 + $(MAKE) -C $$SUBDIR INSTALL_PATH=$(INSTALL_PATH)/$$SUBDIR install; \ 21 + done; 22 + endef 23 + 24 + override define EMIT_TESTS 25 + echo "./run.sh" 26 + endef 9 27 10 28 clean: 11 29 for DIR in $(SUBDIRS); do $(MAKE) -C $$DIR $@ ; done
+3 -2
tools/testing/selftests/futex/functional/Makefile
··· 12 12 futex_wait_uninitialized_heap \ 13 13 futex_wait_private_mapped_file 14 14 15 + TEST_PROGS := $(TARGETS) run.sh 16 + 15 17 .PHONY: all clean 16 18 all: $(TARGETS) 17 19 18 20 $(TARGETS): $(HEADERS) 19 21 20 - run_tests: all 21 - ./run.sh 22 + include ../../lib.mk 22 23 23 24 clean: 24 25 rm -f $(TARGETS)