Skip to content

Commit 2bf9e0a

Browse files
author
Ingo Molnar
committed
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) <[email protected]> Cc: Andrew Morton <[email protected]> Cc: Jason Baron <[email protected]> Cc: Linus Torvalds <[email protected]> Cc: Paul E. McKenney <[email protected]> Cc: Peter Zijlstra <[email protected]> Cc: Shuah Khan <[email protected]> Cc: Thomas Gleixner <[email protected]> Cc: [email protected] Cc: [email protected] Cc: [email protected] Cc: [email protected] Cc: [email protected] Cc: [email protected] Cc: [email protected] Cc: [email protected] Cc: [email protected] Cc: [email protected] Cc: [email protected] Cc: [email protected] Cc: [email protected] Cc: [email protected] Link: http://lkml.kernel.org/r/0c091ecebd78a879ed8a71835d205a691a75ab4e.1438227999.git.jbaron@akamai.com Signed-off-by: Ingo Molnar <[email protected]>
1 parent 579e1ac commit 2bf9e0a

File tree

8 files changed

+253
-253
lines changed

8 files changed

+253
-253
lines changed

lib/Kconfig.debug

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1841,12 +1841,12 @@ config MEMTEST
18411841
memtest=17, mean do 17 test patterns.
18421842
If you are unsure how to answer this question, answer N.
18431843

1844-
config TEST_JUMP_LABEL
1845-
tristate "Test jump label"
1844+
config TEST_STATIC_KEYS
1845+
tristate "Test static keys"
18461846
default n
18471847
depends on m
18481848
help
1849-
Test jump labels.
1849+
Test the static key interfaces.
18501850

18511851
If unsure, say N.
18521852

lib/Makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,8 @@ obj-$(CONFIG_TEST_KSTRTOX) += test-kstrtox.o
3939
obj-$(CONFIG_TEST_LKM) += test_module.o
4040
obj-$(CONFIG_TEST_RHASHTABLE) += test_rhashtable.o
4141
obj-$(CONFIG_TEST_USER_COPY) += test_user_copy.o
42-
obj-$(CONFIG_TEST_JUMP_LABEL) += test_jump_label.o
43-
obj-$(CONFIG_TEST_JUMP_LABEL) += test_jump_label_base.o
42+
obj-$(CONFIG_TEST_STATIC_KEYS) += test_static_keys.o
43+
obj-$(CONFIG_TEST_STATIC_KEYS) += test_static_key_base.o
4444

4545
ifeq ($(CONFIG_DEBUG_KOBJECT),y)
4646
CFLAGS_kobject.o += -DDEBUG

lib/test_jump_label.c

Lines changed: 0 additions & 225 deletions
This file was deleted.

lib/test_jump_label_base.c renamed to lib/test_static_key_base.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Kernel module for testing jump labels.
2+
* Kernel module for testing static keys.
33
*
44
* Copyright 2015 Akamai Technologies Inc. All Rights Reserved
55
*
@@ -47,7 +47,7 @@ static void invert_key(struct static_key *key)
4747
static_key_enable(key);
4848
}
4949

50-
static int __init test_jump_label_base_init(void)
50+
static int __init test_static_key_base_init(void)
5151
{
5252
invert_key(&base_inv_old_true_key);
5353
invert_key(&base_inv_old_false_key);
@@ -57,12 +57,12 @@ static int __init test_jump_label_base_init(void)
5757
return 0;
5858
}
5959

60-
static void __exit test_jump_label_base_exit(void)
60+
static void __exit test_static_key_base_exit(void)
6161
{
6262
}
6363

64-
module_init(test_jump_label_base_init);
65-
module_exit(test_jump_label_base_exit);
64+
module_init(test_static_key_base_init);
65+
module_exit(test_static_key_base_exit);
6666

6767
MODULE_AUTHOR("Jason Baron <[email protected]>");
6868
MODULE_LICENSE("GPL");

0 commit comments

Comments
 (0)