Tamir Duberstein and Kees Cook
97c1f302f2
scanf: convert self-test to KUnit
...
Convert the scanf() self-test to a KUnit test.
In the interest of keeping the patch reasonably-sized this doesn't
refactor the tests into proper parameterized tests - it's all one big
test case.
Reviewed-by: David Gow <davidgow@google.com >
Reviewed-by: Petr Mladek <pmladek@suse.com >
Tested-by: Petr Mladek <pmladek@suse.com >
Signed-off-by: Tamir Duberstein <tamird@gmail.com >
Link: https://lore.kernel.org/r/20250307-scanf-kunit-convert-v9-3-b98820fa39ff@gmail.com
Signed-off-by: Kees Cook <kees@kernel.org >
2025-03-14 13:55:37 -07:00
Tamir Duberstein and Kees Cook
7a79e7daa8
printf: convert self-test to KUnit
...
Convert the printf() self-test to a KUnit test.
In the interest of keeping the patch reasonably-sized this doesn't
refactor the tests into proper parameterized tests - it's all one big
test case.
Signed-off-by: Tamir Duberstein <tamird@gmail.com >
Reviewed-by: Petr Mladek <pmladek@suse.com >
Tested-by: Petr Mladek <pmladek@suse.com >
Link: https://lore.kernel.org/r/20250307-printf-kunit-convert-v6-1-4d85c361c241@gmail.com
Signed-off-by: Kees Cook <kees@kernel.org >
2025-03-13 10:26:33 -07:00
Tamir Duberstein and Kees Cook
ba6be7ba2d
selftests: remove reference to prime_numbers.sh
...
Remove a leftover shell script reference from commit 313b38a6ec
("lib/prime_numbers: convert self-test to KUnit").
Reported-by: kernel test robot <oliver.sang@intel.com >
Closes: https://lore.kernel.org/oe-lkp/202502171110.708d965a-lkp@intel.com
Fixes: 313b38a6ec ("lib/prime_numbers: convert self-test to KUnit")
Signed-off-by: Tamir Duberstein <tamird@gmail.com >
Link: https://lore.kernel.org/r/20250217-fix-prime-numbers-v1-1-eb0ca7235e60@gmail.com
Signed-off-by: Kees Cook <kees@kernel.org >
2025-02-22 06:44:45 -08:00
Muhammad Usama Anjum and Shuah Khan
44b045e27c
selftests: lib: remove strscpy test
...
The strscpy test loads test_strscpy module for testing. But test_strscpy
was converted to Kunit (see fixes). Hence remove strscpy.
Fixes: 41eefc46a3 ("string: Convert strscpy() self-test to KUnit")
Signed-off-by: Muhammad Usama Anjum <usama.anjum@collabora.com >
Signed-off-by: Shuah Khan <skhan@linuxfoundation.org >
2024-08-01 13:55:33 -06:00
Richard Fitzgerald and Petr Mladek
ef04d4ff4b
selftests: lib: Add wrapper script for test_scanf
...
Adds a wrapper shell script for the test_scanf module.
Signed-off-by: Richard Fitzgerald <rf@opensource.cirrus.com >
Reviewed-by: Petr Mladek <pmladek@suse.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-4-rf@opensource.cirrus.com
2021-05-19 15:05:11 +02:00
Thomas Gleixner and Greg Kroah-Hartman
ec8f24b7fa
treewide: Add SPDX license identifier - Makefile/Kconfig
...
Add SPDX license identifiers to all Make/Kconfig files which:
- Have no license information of any form
These files fall under the project license, GPL v2 only. The resulting SPDX
license identifier is:
GPL-2.0-only
Signed-off-by: Thomas Gleixner <tglx@linutronix.de >
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2019-05-21 10:50:46 +02:00
Tobin C. Harding and Shuah Khan
0b0600c8c9
lib: Add test module for strscpy_pad
...
Add a test module for the new strscpy_pad() function. Tie it into the
kselftest infrastructure for lib/ tests.
Acked-by: Kees Cook <keescook@chromium.org >
Signed-off-by: Tobin C. Harding <tobin@kernel.org >
Signed-off-by: Shuah Khan <shuah@kernel.org >
2019-04-08 16:44:21 -06:00
Shuah Khan (Samsung OSG)
9b8f8e7f33
selftests: lib: add prime_numbers.sh test to Makefile
...
prime_numbers.sh is not included in TEST_PROGS. Add it.
Signed-off-by: Shuah Khan (Samsung OSG) <shuah@kernel.org >
2018-05-30 15:29:06 -06:00
David Decotigny and David S. Miller
5fd003f56c
test_bitmap: unit tests for lib/bitmap.c
...
This is mainly testing bitmap construction and conversion to/from u32[]
for now.
Tested:
qemu i386, x86_64, ppc, ppc64 BE and LE, ARM.
Signed-off-by: David Decotigny <decot@googlers.com >
Signed-off-by: David S. Miller <davem@davemloft.net >
2016-02-19 22:54:09 -05:00
Kees Cook and Linus Torvalds
317dc34ab7
selftests: run lib/test_printf module
...
This runs the lib/test_printf module to make sure printf is operating
sanely.
Signed-off-by: Kees Cook <keescook@chromium.org >
Cc: Rasmus Villemoes <linux@rasmusvillemoes.dk >
Cc: Shuah Khan <shuahkh@osg.samsung.com >
Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com >
Signed-off-by: Andrew Morton <akpm@linux-foundation.org >
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org >
2015-11-06 17:50:42 -08:00