lib: add module support to string tests
Subsystems (2)
PATCH 1/1 lib: add module support to string tests
Extract the string test code into its own source file, to allow to compile it either to a loadable module, or builtin into the kernel.
Fixes 03270c13c5ffaa6a ("lib/string.c: add testcases for memset16/32/64")
Signed-off-by Geert Uytterhoeven <[email protected]>
--- lib/Kconfig | 2 +- lib/Makefile | 1 + lib/string.c | 141 ------------------------------------------------------ lib/test_string.c | 141 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ 4 files changed, 143 insertions(+), 142 deletions(-) create mode 100644 lib/test_string.c
lib/Kconfig +1 -1
@@ -573,6 +573,6 @@ config PRIME_NUMBERS tristate config STRING_SELFTEST - bool "Test string functions" + tristate "Test string functions" endmenu
lib/Makefile +1 -0
@@ -39,6 +39,7 @@ obj-y += bcd.o div64.o sort.o parser.o debug_locks.o random32.o \ bsearch.o find_bit.o llist.o memweight.o kfifo.o \ percpu-refcount.o percpu_ida.o rhashtable.o reciprocal_div.o \ once.o refcount.o usercopy.o errseq.o +obj-$(CONFIG_STRING_SELFTEST) += test_string.o obj-y += string_helpers.o obj-$(CONFIG_TEST_STRING_HELPERS) += test-string_helpers.o obj-y += hexdump.o
lib/string.c +0 -141
144 lines not on this page · raw message
lib/test_string.c new file +141 -0
141 lines not on this page · raw message
Signature · 1 line
2.7.4