summaryrefslogtreecommitdiff
path: root/tools/testing/selftests
diff options
context:
space:
mode:
authorIngo Molnar <mingo@kernel.org>2015-08-03 11:42:57 +0200
committerIngo Molnar <mingo@kernel.org>2015-08-03 11:51:12 +0200
commit2bf9e0ab08c64ac56067555911a1ae81ebff5f96 (patch)
treea24fff21bdf23d155f6a2514956f94be0578a5ce /tools/testing/selftests
parent579e1acb153464649781fe5555b4892c0ff84a40 (diff)
locking/static_keys: Provide a selftest
The 'jump label' self-test is in reality testing static keys - rename things accordingly. Also prettify the code in various places while at it. Acked-by: Peter Zijlstra (Intel) <peterz@infradead.org> Cc: Andrew Morton <akpm@linux-foundation.org> Cc: Jason Baron <jbaron@akamai.com> Cc: Linus Torvalds <torvalds@linux-foundation.org> Cc: Paul E. McKenney <paulmck@linux.vnet.ibm.com> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Shuah Khan <shuahkh@osg.samsung.com> 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: 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/selftests')
-rw-r--r--tools/testing/selftests/jumplabel/test_jump_label.sh16
-rw-r--r--tools/testing/selftests/static_keys/Makefile (renamed from tools/testing/selftests/jumplabel/Makefile)4
-rw-r--r--tools/testing/selftests/static_keys/test_static_keys.sh16
3 files changed, 18 insertions, 18 deletions
diff --git a/tools/testing/selftests/jumplabel/test_jump_label.sh b/tools/testing/selftests/jumplabel/test_jump_label.sh
deleted file mode 100644
index 3457e8a64e77..000000000000
--- a/tools/testing/selftests/jumplabel/test_jump_label.sh
+++ /dev/null
@@ -1,16 +0,0 @@
-#!/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
diff --git a/tools/testing/selftests/jumplabel/Makefile b/tools/testing/selftests/static_keys/Makefile
index 7526aa59e005..9cdadf37f114 100644
--- a/tools/testing/selftests/jumplabel/Makefile
+++ b/tools/testing/selftests/static_keys/Makefile
@@ -1,8 +1,8 @@
-# Makefile for jump label selftests
+# Makefile for static keys selftests
# No binaries, but make sure arg-less "make" doesn't trigger "run_tests"
all:
-TEST_PROGS := test_jump_label.sh
+TEST_PROGS := test_static_keys.sh
include ../lib.mk
diff --git a/tools/testing/selftests/static_keys/test_static_keys.sh b/tools/testing/selftests/static_keys/test_static_keys.sh
new file mode 100644
index 000000000000..1261e3fa1e3a
--- /dev/null
+++ b/tools/testing/selftests/static_keys/test_static_keys.sh
@@ -0,0 +1,16 @@
+#!/bin/sh
+# Runs static keys kernel module tests
+
+if /sbin/modprobe -q test_static_key_base; then
+ if /sbin/modprobe -q test_static_keys; then
+ echo "static_key: ok"
+ /sbin/modprobe -q -r test_static_keys
+ /sbin/modprobe -q -r test_static_key_base
+ else
+ echo "static_keys: [FAIL]"
+ /sbin/modprobe -q -r test_static_key_base
+ fi
+else
+ echo "static_key: [FAIL]"
+ exit 1
+fi