linux/lib/kunit
Kees Cook 7554a7b96d kunit: executor: Simplify string allocation handling
The alloc/copy code pattern is better consolidated to single kstrdup (and
kstrndup) calls instead. This gets rid of deprecated[1] strncpy() uses as
well. Replace one other strncpy() use with the more idiomatic strscpy().

Link: https://github.com/KSPP/linux/issues/90 [1]
Reviewed-by: David Gow <davidgow@google.com>
Signed-off-by: Kees Cook <kees@kernel.org>
Signed-off-by: Shuah Khan <skhan@linuxfoundation.org>
2024-07-12 10:11:48 -06:00
..
.kunitconfig
assert_test.c kunit: Cover 'assert.c' with tests 2024-05-30 12:53:47 -06:00
assert.c kunit: Cover 'assert.c' with tests 2024-05-30 12:53:47 -06:00
attributes.c kunit: add is_init test attribute 2023-12-18 13:21:15 -07:00
debugfs.c kunit: add ability to run tests after boot using debugfs 2023-12-18 13:25:49 -07:00
debugfs.h
device-impl.h kunit: device: Unregister the kunit_bus on shutdown 2024-02-06 17:07:37 -07:00
device.c kunit: unregister the device on error 2024-05-06 14:22:02 -06:00
executor_test.c kunit: executor: Simplify string allocation handling 2024-07-12 10:11:48 -06:00
executor.c kunit: executor: Simplify string allocation handling 2024-07-12 10:11:48 -06:00
hooks-impl.h
hooks.c
Kconfig kunit: test: Move fault tests behind KUNIT_FAULT_TEST Kconfig option 2024-05-06 14:22:02 -06:00
kunit-example-test.c kunit: add missing MODULE_DESCRIPTION() macros to core modules 2024-06-07 15:59:05 -06:00
kunit-test.c kunit: add missing MODULE_DESCRIPTION() macros to core modules 2024-06-07 15:59:05 -06:00
Makefile kunit: test: Add vm_mmap() allocation resource manager 2024-06-14 19:31:33 -06:00
resource.c
static_stub.c
string-stream-test.c kunit: string-stream-test: use KUNIT_DEFINE_ACTION_WRAPPER 2024-05-06 14:22:02 -06:00
string-stream.c kunit: string-stream: Allow ERR_PTR to be passed to string_stream_destroy() 2023-12-18 13:21:14 -07:00
string-stream.h
test.c kunit: add missing MODULE_DESCRIPTION() macros to core modules 2024-06-07 15:59:05 -06:00
try-catch-impl.h
try-catch.c kunit: Fix race condition in try-catch completion 2024-05-06 14:22:02 -06:00
user_alloc.c kunit/usercopy: Disable testing on !CONFIG_MMU 2024-07-02 10:11:40 -06:00