Page MenuHomeFreeBSD

libc: add memset test for int-to-char conversion
ClosedPublic

Authored by strajabot on Jun 25 2024, 9:30 PM.
Tags
None
Referenced Files
F109316250: D45738.diff
Mon, Feb 3, 11:55 AM
Unknown Object (File)
Sat, Feb 1, 10:08 AM
Unknown Object (File)
Fri, Jan 17, 5:48 PM
Unknown Object (File)
Dec 20 2024, 10:42 AM
Unknown Object (File)
Nov 21 2024, 4:46 PM
Unknown Object (File)
Nov 7 2024, 11:44 AM
Unknown Object (File)
Nov 7 2024, 11:44 AM
Unknown Object (File)
Oct 24 2024, 5:40 AM
Subscribers

Details

Summary

Test case to check if an implementation of memset correctly
handles the value passed being wider than a byte

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 58392
Build 55280: arc lint + arc unit

Event Timeline

Larger buffer size better tests how the parameter is handled

Test looks reasonable. Were you able to trigger test suite failure with your broken memset?

lib/libc/tests/string/memset_test.c
6–26

No need to put the full license text in if you already have a SPDX identifier.

Yes, the test fails with the broken memset, and passes with the fixed version

Leave only the SPDX identifier and copyright

Looks reasonable. Still needs approval from a src committer.

This revision is now accepted and ready to land.Jun 29 2024, 7:51 AM

Approved with a tiny style change that can be applied

lib/libc/tests/string/memset_test.c
18

style(9) wants spaces -- for (int i = 0; i < 64; i++) {

This revision was automatically updated to reflect the committed changes.