strscpy_check(9)
π
strscpy_check(9) π
okay so this is from the Kernel API Manual, bestie, and we're looking at strscpy_check(9) β a specific test case runner with tiny helper main character energy π
β¨ NAME β¨
strscpy_check β run a specific test case. periodt π
π§ͺ SYNOPSIS π§ͺ
void strscpy_check (struct kunit *test , char *src , int count , int expected , int chars , int terminator , int pad );
π ARGUMENTS π
testβ KUnit test context pointer. it's the test's little backpack πsrcβ source string, and it's the argument you hand tostrscpy_padβ¨countβ size of the destination buffer, also an argument tostrscpy_padπexpectedβ the return value you expect from the call tostrscpy_padπcharsβ number of characters from thesrcstring that should get written to thedstbuffer π«terminatorβ1if there should be a terminating null byte,0otherwise π«Άpadβ number of pad characters expected in the tail of thedstbuffer. (paddoes not include the null terminator byte.) π§
π DESCRIPTION π
It calls strscpy_pad and then verifies the return value and the state of the destination buffer after the call returns. lowkey a little post-call vibe check, but for real correctness π₯
π SEE ALSO π
- Kernel file
./lib/tests/string_kunit.c alloc_max_bench_buffer(9)fill_random_string(9)STRING_BENCH(9)STRING_BENCH_BUF(9)
mwah π β source/version is ./lib/tests, dated October 2026, and yeah bestie, that's the strscpy_check(9) page π«Ά
π¦ where this page comes from
- nixpkgs unstable: linux-manual 7.3.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms