summaryrefslogtreecommitdiff
path: root/tools/testing/selftests/lkdtm/Makefile
diff options
context:
space:
mode:
authorKees Cook <keescook@chromium.org>2020-01-09 21:02:06 -0800
committerShuah Khan <skhan@linuxfoundation.org>2020-01-10 14:50:28 -0700
commit46d1a0f03d6611659420c3ddde28da3f3f134a3f (patch)
tree477253d86477c16817660c794b2defcadae04189 /tools/testing/selftests/lkdtm/Makefile
parent192c197cbca599321de95a4cf15c2fa0681140d3 (diff)
selftests/lkdtm: Add tests for LKDTM targets
This adds a basic framework for running all the "safe" LKDTM tests. This will allow easy introspection into any selftest logs to examine the results of most LKDTM tests. Signed-off-by: Kees Cook <keescook@chromium.org> Signed-off-by: Shuah Khan <skhan@linuxfoundation.org>
Diffstat (limited to 'tools/testing/selftests/lkdtm/Makefile')
-rw-r--r--tools/testing/selftests/lkdtm/Makefile12
1 files changed, 12 insertions, 0 deletions
diff --git a/tools/testing/selftests/lkdtm/Makefile b/tools/testing/selftests/lkdtm/Makefile
new file mode 100644
index 000000000000..1bcc9ee990eb
--- /dev/null
+++ b/tools/testing/selftests/lkdtm/Makefile
@@ -0,0 +1,12 @@
+# SPDX-License-Identifier: GPL-2.0
+# Makefile for LKDTM regression tests
+
+include ../lib.mk
+
+# NOTE: $(OUTPUT) won't get default value if used before lib.mk
+TEST_FILES := tests.txt
+TEST_GEN_PROGS = $(patsubst %,$(OUTPUT)/%.sh,$(shell awk '{print $$1}' tests.txt | sed -e 's/\#//'))
+all: $(TEST_GEN_PROGS)
+
+$(OUTPUT)/%: run.sh tests.txt
+ install -m 0744 run.sh $@