[PATCH] Add strlcpy/wcslcpy testcase

DJ Delorie dj@redhat.com
Thu Jul 27 19:20:29 GMT 2023


Sunil Pandey <skpgkp2@gmail.com> writes:
> Actually, it's already testing the generic version of strlcpy
> implementation from the string/strlcpy.c file, so no need to implement
> another SIMPLE_* function.

While that is true at the moment, in the future someone will start
optimizing that function, add cpu-family-specific variants, etc.  Then,
when you're running on some core that chooses a vector-optimized
strlcpy, the simple function will be useful.

Note: I'm not saying "you must add this" as most of the other tests
don't either, and some test is better than no test.  I just don't want
you to make a decision based on me not explaining myself well enough ;-)

The easy path would have been to just add the IMPL line and have that
extra level of paranoia built-in from the start.



More information about the Libc-alpha mailing list