Skip to content

Commit 50f530e

Browse files
rfvirgilpmladek
authored andcommitted
lib: test_scanf: Add tests for sscanf number conversion
Adds test_sscanf to test various number conversion cases, as number conversion was previously broken. This also tests the simple_strtoxxx() functions exported from vsprintf.c. Signed-off-by: Richard Fitzgerald <[email protected]> Acked-by: Andy Shevchenko <[email protected]> Signed-off-by: Petr Mladek <[email protected]> Link: https://lore.kernel.org/r/[email protected]
1 parent 900fdc4 commit 50f530e

File tree

4 files changed

+756
-0
lines changed

4 files changed

+756
-0
lines changed

MAINTAINERS

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19395,6 +19395,7 @@ S: Maintained
1939519395
T: git git://git.kernel.org/pub/scm/linux/kernel/git/pmladek/printk.git
1939619396
F: Documentation/core-api/printk-formats.rst
1939719397
F: lib/test_printf.c
19398+
F: lib/test_scanf.c
1939819399
F: lib/vsprintf.c
1939919400

1940019401
VT1211 HARDWARE MONITOR DRIVER

lib/Kconfig.debug

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2163,6 +2163,9 @@ config TEST_KSTRTOX
21632163
config TEST_PRINTF
21642164
tristate "Test printf() family of functions at runtime"
21652165

2166+
config TEST_SCANF
2167+
tristate "Test scanf() family of functions at runtime"
2168+
21662169
config TEST_BITMAP
21672170
tristate "Test bitmap_*() family of functions at runtime"
21682171
help

lib/Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,7 @@ obj-$(CONFIG_TEST_USER_COPY) += test_user_copy.o
8383
obj-$(CONFIG_TEST_STATIC_KEYS) += test_static_keys.o
8484
obj-$(CONFIG_TEST_STATIC_KEYS) += test_static_key_base.o
8585
obj-$(CONFIG_TEST_PRINTF) += test_printf.o
86+
obj-$(CONFIG_TEST_SCANF) += test_scanf.o
8687
obj-$(CONFIG_TEST_BITMAP) += test_bitmap.o
8788
obj-$(CONFIG_TEST_STRSCPY) += test_strscpy.o
8889
obj-$(CONFIG_TEST_UUID) += test_uuid.o

0 commit comments

Comments
 (0)