strscpy_check(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… 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 to strscpy_pad ✨
  • count β€” size of the destination buffer, also an argument to strscpy_pad πŸ“
  • expected β€” the return value you expect from the call to strscpy_pad πŸ‘€
  • chars β€” number of characters from the src string that should get written to the dst buffer πŸ’«
  • terminator β€” 1 if there should be a terminating null byte, 0 otherwise 🫢
  • pad β€” number of pad characters expected in the tail of the dst buffer. (pad does 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 🌈


mwah πŸ’‹ β€” source/version is ./lib/tests, dated October 2026, and yeah bestie, that's the strscpy_check(9) page 🫢

πŸ“¦ where this page comes from