mirror of
https://github.com/ukui/kernel.git
synced 2026-03-09 10:07:04 -07:00
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 <rf@opensource.cirrus.com> Acked-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Signed-off-by: Petr Mladek <pmladek@suse.com> Link: https://lore.kernel.org/r/20210514161206.30821-3-rf@opensource.cirrus.com
This commit is contained in:
committed by
Petr Mladek
parent
900fdc4573
commit
50f530e176
@@ -19395,6 +19395,7 @@ S: Maintained
|
||||
T: git git://git.kernel.org/pub/scm/linux/kernel/git/pmladek/printk.git
|
||||
F: Documentation/core-api/printk-formats.rst
|
||||
F: lib/test_printf.c
|
||||
F: lib/test_scanf.c
|
||||
F: lib/vsprintf.c
|
||||
|
||||
VT1211 HARDWARE MONITOR DRIVER
|
||||
|
||||
@@ -2163,6 +2163,9 @@ config TEST_KSTRTOX
|
||||
config TEST_PRINTF
|
||||
tristate "Test printf() family of functions at runtime"
|
||||
|
||||
config TEST_SCANF
|
||||
tristate "Test scanf() family of functions at runtime"
|
||||
|
||||
config TEST_BITMAP
|
||||
tristate "Test bitmap_*() family of functions at runtime"
|
||||
help
|
||||
|
||||
@@ -83,6 +83,7 @@ obj-$(CONFIG_TEST_USER_COPY) += test_user_copy.o
|
||||
obj-$(CONFIG_TEST_STATIC_KEYS) += test_static_keys.o
|
||||
obj-$(CONFIG_TEST_STATIC_KEYS) += test_static_key_base.o
|
||||
obj-$(CONFIG_TEST_PRINTF) += test_printf.o
|
||||
obj-$(CONFIG_TEST_SCANF) += test_scanf.o
|
||||
obj-$(CONFIG_TEST_BITMAP) += test_bitmap.o
|
||||
obj-$(CONFIG_TEST_STRSCPY) += test_strscpy.o
|
||||
obj-$(CONFIG_TEST_UUID) += test_uuid.o
|
||||
|
||||
751
lib/test_scanf.c
Normal file
751
lib/test_scanf.c
Normal file
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user