Skip to contentSkip to conversation

lib: add module support to glob tests

PATCH New [email protected] 1 participant 1 message Feb 24, 2017 Library code

lore
Share & tools
lore

[email protected]

author maintainer
#0 lore raw

PATCH 107/124 lib: add module support to glob tests

From: Geert Uytterhoeven <[email protected]>
Subject: lib: add module support to glob tests

Extract the glob test code into its own source file, to allow to compile it either to a loadable module, or builtin into the kernel.

---

 lib/Kconfig    |    3 
 lib/Makefile   |    1 
 lib/glob.c     |  164 ----------------------------------------------
 lib/globtest.c |  167 +++++++++++++++++++++++++++++++++++++++++++++++
 4 files changed, 169 insertions(+), 166 deletions(-)
lib/Kconfig renamed from lib/Kconfig~lib-add-module-support-to-glob-tests +1 -2
diff -puN lib/Kconfig~lib-add-module-support-to-glob-tests lib/Kconfig
@@ -431,8 +431,7 @@ config GLOB
 	  depends on this.
 
 config GLOB_SELFTEST
-	bool "glob self-test on init"
-	default n
+	tristate "glob self-test on init"
 	depends on GLOB
 	help
 	  This option enables a simple self-test of the glob_match
lib/Makefile renamed from lib/Makefile~lib-add-module-support-to-glob-tests +1 -0
diff -puN lib/Makefile~lib-add-module-support-to-glob-tests lib/Makefile
@@ -162,6 +162,7 @@ obj-$(CONFIG_CORDIC) += cordic.o
 obj-$(CONFIG_DQL) += dynamic_queue_limits.o
 
 obj-$(CONFIG_GLOB) += glob.o
+obj-$(CONFIG_GLOB_SELFTEST) += globtest.o
 
 obj-$(CONFIG_MPILIB) += mpi/
 obj-$(CONFIG_SIGNATURE) += digsig.o
lib/glob.c renamed from lib/glob.c~lib-add-module-support-to-glob-tests +0 -164

167 lines not on this page · raw message

lib/globtest.c new file +167 -0

167 lines not on this page · raw message

_