bpf: add various tests around spill/fill of regs
[linux-block.git] / tools / testing / selftests / Makefile
CommitLineData
66a01b96 1TARGETS = breakpoints
f4ecb322 2TARGETS += capabilities
58c7be84
PE
3TARGETS += cpu-hotplug
4TARGETS += efivarfs
96e869d8
AM
5TARGETS += exec
6TARGETS += firmware
7TARGETS += ftrace
ecac1a75 8TARGETS += futex
7e722473 9TARGETS += ipc
66a01b96 10TARGETS += kcmp
317dc34a 11TARGETS += lib
b6d97344 12TARGETS += membarrier
4f5ce5e8 13TARGETS += memfd
58c7be84 14TARGETS += memory-hotplug
db181ce0 15TARGETS += mount
96e869d8 16TARGETS += mqueue
a6f68034 17TARGETS += net
6ad92bf6 18TARGETS += nsfs
96e869d8 19TARGETS += powerpc
cc04a46f 20TARGETS += pstore
17afab1d 21TARGETS += ptrace
c99ee51a 22TARGETS += seccomp
19fd2868 23TARGETS += sigaltstack
96e869d8 24TARGETS += size
1087d019 25TARGETS += static_keys
96e869d8 26TARGETS += sysctl
2278e5ed 27ifneq (1, $(quicktest))
0bc4b0cf 28TARGETS += timers
2278e5ed 29endif
3e2a4c18 30TARGETS += user
96e869d8 31TARGETS += vm
3f705dfd 32TARGETS += x86
f21fb798 33TARGETS += zram
96e869d8 34#Please keep the TARGETS list alphabetically sorted
2278e5ed
SK
35# Run "make quicktest=1 run_tests" or
36# "make quicktest=1 kselftest from top level Makefile
274343ad 37
ddddda9b
SK
38TARGETS_HOTPLUG = cpu-hotplug
39TARGETS_HOTPLUG += memory-hotplug
40
67d8712d
SK
41# Clear LDFLAGS and MAKEFLAGS if called from main
42# Makefile to avoid test build failures when test
43# Makefile doesn't have explicit build rules.
44ifeq (1,$(MAKELEVEL))
60df4642 45override LDFLAGS =
67d8712d
SK
46override MAKEFLAGS =
47endif
48
274343ad
FW
49all:
50 for TARGET in $(TARGETS); do \
51 make -C $$TARGET; \
52 done;
53
cab6b056 54run_tests: all
f467f714
FW
55 for TARGET in $(TARGETS); do \
56 make -C $$TARGET run_tests; \
57 done;
58
ddddda9b
SK
59hotplug:
60 for TARGET in $(TARGETS_HOTPLUG); do \
61 make -C $$TARGET; \
62 done;
63
64run_hotplug: hotplug
65 for TARGET in $(TARGETS_HOTPLUG); do \
66 make -C $$TARGET run_full_test; \
67 done;
68
69clean_hotplug:
70 for TARGET in $(TARGETS_HOTPLUG); do \
71 make -C $$TARGET clean; \
72 done;
73
f615e2bb
HT
74run_pstore_crash:
75 make -C pstore run_crash
76
32dcfba6
ME
77INSTALL_PATH ?= install
78INSTALL_PATH := $(abspath $(INSTALL_PATH))
79ALL_SCRIPT := $(INSTALL_PATH)/run_kselftest.sh
80
81install:
82ifdef INSTALL_PATH
83 @# Ask all targets to install their files
84 mkdir -p $(INSTALL_PATH)
85 for TARGET in $(TARGETS); do \
32dcfba6
ME
86 make -C $$TARGET INSTALL_PATH=$(INSTALL_PATH)/$$TARGET install; \
87 done;
88
89 @# Ask all targets to emit their test scripts
90 echo "#!/bin/bash" > $(ALL_SCRIPT)
91 echo "cd \$$(dirname \$$0)" >> $(ALL_SCRIPT)
92 echo "ROOT=\$$PWD" >> $(ALL_SCRIPT)
93
94 for TARGET in $(TARGETS); do \
95 echo "echo ; echo Running tests in $$TARGET" >> $(ALL_SCRIPT); \
96 echo "echo ========================================" >> $(ALL_SCRIPT); \
97 echo "cd $$TARGET" >> $(ALL_SCRIPT); \
98 make -s --no-print-directory -C $$TARGET emit_tests >> $(ALL_SCRIPT); \
99 echo "cd \$$ROOT" >> $(ALL_SCRIPT); \
100 done;
101
102 chmod u+x $(ALL_SCRIPT)
103else
104 $(error Error: set INSTALL_PATH to use install)
105endif
106
274343ad
FW
107clean:
108 for TARGET in $(TARGETS); do \
109 make -C $$TARGET clean; \
110 done;
32dcfba6
ME
111
112.PHONY: install