summaryrefslogtreecommitdiffstats
path: root/tools/testing/selftests/jumplabel
diff options
context:
space:
mode:
Diffstat (limited to 'tools/testing/selftests/jumplabel')
-rw-r--r--tools/testing/selftests/jumplabel/Makefile8
-rw-r--r--tools/testing/selftests/jumplabel/test_jump_label.sh16
2 files changed, 24 insertions, 0 deletions
diff --git a/tools/testing/selftests/jumplabel/Makefile b/tools/testing/selftests/jumplabel/Makefile
new file mode 100644
index 000000000000..7526aa59e005
--- /dev/null
+++ b/tools/testing/selftests/jumplabel/Makefile
@@ -0,0 +1,8 @@
+# Makefile for jump label selftests
+
+# No binaries, but make sure arg-less "make" doesn't trigger "run_tests"
+all:
+
+TEST_PROGS := test_jump_label.sh
+
+include ../lib.mk
diff --git a/tools/testing/selftests/jumplabel/test_jump_label.sh b/tools/testing/selftests/jumplabel/test_jump_label.sh
new file mode 100644
index 000000000000..3457e8a64e77
--- /dev/null
+++ b/tools/testing/selftests/jumplabel/test_jump_label.sh
@@ -0,0 +1,16 @@
+#!/bin/sh
+# Runs jump label kernel module tests
+
+if /sbin/modprobe -q test_jump_label_base; then
+ if /sbin/modprobe -q test_jump_label; then
+ echo "jump_label: ok"
+ /sbin/modprobe -q -r test_jump_label
+ /sbin/modprobe -q -r test_jump_label_base
+ else
+ echo "jump_label: [FAIL]"
+ /sbin/modprobe -q -r test_jump_label_base
+ fi
+else
+ echo "jump_label: [FAIL]"
+ exit 1
+fi