summaryrefslogtreecommitdiff
path: root/lib/Kconfig
diff options
context:
space:
mode:
authorGeorge Spelvin <linux@horizon.com>2014-08-06 16:09:25 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2014-08-06 18:01:25 -0700
commit5f9be8248d9802730185f98f4db41285dc00283c (patch)
tree03df2ac3a2557e1565943d36cda6fe1d1e28539a /lib/Kconfig
parentb01250856b25f4417c51aa33afc451fbf7da1484 (diff)
lib/glob.c: add CONFIG_GLOB_SELFTEST
This was useful during development, and is retained for future regression testing. GCC appears to have no way to place string literals in a particular section; adding __initconst to a char pointer leaves the string itself in the default string section, where it will not be thrown away after module load. Thus all string constants are kept in explicitly declared and named arrays. Sorry this makes printk a bit harder to read. At least the tests are more compact. Signed-off-by: George Spelvin <linux@horizon.com> Cc: Randy Dunlap <rdunlap@infradead.org> Cc: Tejun Heo <tj@kernel.org> Cc: Ingo Molnar <mingo@elte.hu> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'lib/Kconfig')
-rw-r--r--lib/Kconfig14
1 files changed, 14 insertions, 0 deletions
diff --git a/lib/Kconfig b/lib/Kconfig
index 41bfeec72e40..df872659ddd3 100644
--- a/lib/Kconfig
+++ b/lib/Kconfig
@@ -415,6 +415,20 @@ config GLOB
are compiling an out-of tree driver which tells you that it
depends on this.
+config GLOB_SELFTEST
+ bool "glob self-test on init"
+ default n
+ depends on GLOB
+ help
+ This option enables a simple self-test of the glob_match
+ function on startup. It is primarily useful for people
+ working on the code to ensure they haven't introduced any
+ regressions.
+
+ It only adds a little bit of code and slows kernel boot (or
+ module load) by a small amount, so you're welcome to play with
+ it, but you probably don't need it.
+
#
# Netlink attribute parsing support is select'ed if needed
#