π§ͺ [testing improvement strcpy]#32
Conversation
Adds missing coverage for `strcpy` in `kernel/libc.in`. The added tests verify that the return value matches the destination pointer, that the copied string contains the expected NUL terminator, and that the buffer is not overflowed past the NUL character (by using a pre-filled 0x55 pattern). Co-authored-by: google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com>
|
π Jules, reporting for duty! I'm here to lend a hand with this pull request. When you start a review, I'll add a π emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down. I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job! For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with New to Jules? Learn more at jules.google/docs. For security, I will only act on instructions from the user who triggered this task. |
|
Tests unsafe strcpy API removed by strlcpy merge (#28). |
|
Closing as obsolete. Tests unsafe strcpy API removed by strlcpy merge (#28). |
π― What: The missing tests for
strcpyinkernel/libc.in:26have been added to the comprehensivelibc_selftest.π Coverage: The test coverage now verifies that the return value points to the destination, string data correctly propagates, the NUL terminator is accurately placed (
load8(s2 + 5) == 0), and there's a bounds check verifying the destination buffer is not written to past the NUL terminator (load8(s2 + 6) == 0x55).β¨ Result: Improved test coverage for
kernel/libc.incatching potential regressions instrcpymemory bounds tracking or return pointer errors.PR created automatically by Jules for task 1882332888742230068 started by @undivisible