summaryrefslogtreecommitdiffstats
path: root/tools/testing
diff options
context:
space:
mode:
authorJason Baron <jbaron@akamai.com>2015-07-30 03:59:44 +0000
committerIngo Molnar <mingo@kernel.org>2015-08-03 11:51:11 +0200
commit579e1acb153464649781fe5555b4892c0ff84a40 (patch)
treee356583bd738b693e53b02f427672e9967943598 /tools/testing
parented79e946732e5311934d7f404b3b4e702e45cb97 (diff)
downloadlinux-579e1acb153464649781fe5555b4892c0ff84a40.tar.gz
linux-579e1acb153464649781fe5555b4892c0ff84a40.tar.bz2
linux-579e1acb153464649781fe5555b4892c0ff84a40.zip
jump_label: Provide a self-test
Signed-off-by: Jason Baron <jbaron@akamai.com> Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org> Cc: Andrew Morton <akpm@linux-foundation.org> Cc: Linus Torvalds <torvalds@linux-foundation.org> Cc: Paul E. McKenney <paulmck@linux.vnet.ibm.com> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Thomas Gleixner <tglx@linutronix.de> Cc: benh@kernel.crashing.org Cc: bp@alien8.de Cc: davem@davemloft.net Cc: ddaney@caviumnetworks.com Cc: heiko.carstens@de.ibm.com Cc: linux-kernel@vger.kernel.org Cc: liuj97@gmail.com Cc: luto@amacapital.net Cc: michael@ellerman.id.au Cc: rabin@rab.in Cc: ralf@linux-mips.org Cc: rostedt@goodmis.org Cc: shuahkh@osg.samsung.com Cc: vbabka@suse.cz Cc: will.deacon@arm.com Link: http://lkml.kernel.org/r/0c091ecebd78a879ed8a71835d205a691a75ab4e.1438227999.git.jbaron@akamai.com Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'tools/testing')
-rw-r--r--tools/testing/selftests/Makefile1
-rw-r--r--tools/testing/selftests/jumplabel/Makefile8
-rw-r--r--tools/testing/selftests/jumplabel/test_jump_label.sh16
3 files changed, 25 insertions, 0 deletions
diff --git a/tools/testing/selftests/Makefile b/tools/testing/selftests/Makefile
index 24ae9e829e9a..b8f12e0897e6 100644
--- a/tools/testing/selftests/Makefile
+++ b/tools/testing/selftests/Makefile
@@ -20,6 +20,7 @@ ifneq (1, $(quicktest))
TARGETS += timers
endif
TARGETS += user
+TARGETS += jumplabel
TARGETS += vm
TARGETS += x86
#Please keep the TARGETS list alphabetically sorted
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