<feed xmlns='http://www.w3.org/2005/Atom'>
<title>src/lib/libc/tests/string/Makefile, branch main</title>
<subtitle>FreeBSD source tree</subtitle>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/'/>
<entry>
<title>libc/tests/string: add a more comprehensive unit test for strrchr()</title>
<updated>2026-04-08T13:21:50+00:00</updated>
<author>
<name>Robert Clausecker</name>
<email>fuz@FreeBSD.org</email>
</author>
<published>2026-03-22T21:39:42+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=8b5d77bbcbd98e684226950be1c779e108059d8d'/>
<id>8b5d77bbcbd98e684226950be1c779e108059d8d</id>
<content type='text'>
The unit tests are patterned after those for memrchr().
This catches the issue found in 293915.

PR:		293915
Reviewed by:	strajabot
Reported by:	safonov.paul@gmail.com
MFC after:	1 week
Differential Revision:	https://reviews.freebsd.org/D56037
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The unit tests are patterned after those for memrchr().
This catches the issue found in 293915.

PR:		293915
Reviewed by:	strajabot
Reported by:	safonov.paul@gmail.com
MFC after:	1 week
Differential Revision:	https://reviews.freebsd.org/D56037
</pre>
</div>
</content>
</entry>
<entry>
<title>lib/libc/tests/string: add test for strnlen()</title>
<updated>2024-10-15T11:34:45+00:00</updated>
<author>
<name>Strahinja Stanišić</name>
<email>strajabot@FreeBSD.org</email>
</author>
<published>2024-10-14T21:09:28+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=7bedae81adaff4b4d291ba1f650b5b915ce207bf'/>
<id>7bedae81adaff4b4d291ba1f650b5b915ce207bf</id>
<content type='text'>
Tests for strnlen, checks alignments from up to 16 and buffer sizes up
to 64, also checks that passing SIZE_MAX as maxlen works, because it can
cause a wraparound error if strnlen is incorrect.

Reviewed by:	fuz, emaste (GSoC mentors), kib
Sponsored by:	Google LLC (GSoC 2024)
Differential Revision:	https://reviews.freebsd.org/D46275
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Tests for strnlen, checks alignments from up to 16 and buffer sizes up
to 64, also checks that passing SIZE_MAX as maxlen works, because it can
cause a wraparound error if strnlen is incorrect.

Reviewed by:	fuz, emaste (GSoC mentors), kib
Sponsored by:	Google LLC (GSoC 2024)
Differential Revision:	https://reviews.freebsd.org/D46275
</pre>
</div>
</content>
</entry>
<entry>
<title>Remove residual blank line at start of Makefile</title>
<updated>2024-07-15T22:43:39+00:00</updated>
<author>
<name>Warner Losh</name>
<email>imp@FreeBSD.org</email>
</author>
<published>2024-07-15T04:46:32+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=e9ac41698b2f322d55ccf9da50a3596edb2c1800'/>
<id>e9ac41698b2f322d55ccf9da50a3596edb2c1800</id>
<content type='text'>
This is a residual of the $FreeBSD$ removal.

MFC After: 3 days (though I'll just run the command on the branches)
Sponsored by: Netflix
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This is a residual of the $FreeBSD$ removal.

MFC After: 3 days (though I'll just run the command on the branches)
Sponsored by: Netflix
</pre>
</div>
</content>
</entry>
<entry>
<title>libc: Add memset test for int-to-char conversion</title>
<updated>2024-07-13T13:07:49+00:00</updated>
<author>
<name>Strahinja Stanišić</name>
<email>strajabot@FreeBSD.org</email>
</author>
<published>2024-07-13T12:53:07+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=f0d1236f0fc944165b657306a39d44fcc6aaa709'/>
<id>f0d1236f0fc944165b657306a39d44fcc6aaa709</id>
<content type='text'>
Test case to check if an implementation of memset correctly
handles the value passed being wider than a byte

Approved by:	emaste
Reviewed By:	fuz (GSoC mentor), emaste
Sponsored by:	Google LLC (GSoC 2024)
Differential Revision: https://reviews.freebsd.org/D45738
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Test case to check if an implementation of memset correctly
handles the value passed being wider than a byte

Approved by:	emaste
Reviewed By:	fuz (GSoC mentor), emaste
Sponsored by:	Google LLC (GSoC 2024)
Differential Revision: https://reviews.freebsd.org/D45738
</pre>
</div>
</content>
</entry>
<entry>
<title>lib/libc/tests/string: add memrchr unit tests</title>
<updated>2023-12-25T13:59:58+00:00</updated>
<author>
<name>Robert Clausecker</name>
<email>fuz@FreeBSD.org</email>
</author>
<published>2023-12-06T09:11:40+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=691ff1832e09a6ccbc8f5b04c88cafc7452b3ce6'/>
<id>691ff1832e09a6ccbc8f5b04c88cafc7452b3ce6</id>
<content type='text'>
The "values" test case is specifically crafted to detect the off-by-one
error previous discovered in the scalar strchrnul implementation.

Tested by:	developers@, exp-run
Approved by:	mjg
MFC after:	1 month
MFC to:		stable/14
PR:		275785
Differential Revision:	https://reviews.freebsd.org/D42925
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The "values" test case is specifically crafted to detect the off-by-one
error previous discovered in the scalar strchrnul implementation.

Tested by:	developers@, exp-run
Approved by:	mjg
MFC after:	1 month
MFC to:		stable/14
PR:		275785
Differential Revision:	https://reviews.freebsd.org/D42925
</pre>
</div>
</content>
</entry>
<entry>
<title>lib/libc/tests/string: add unit tests for memccpy()</title>
<updated>2023-12-25T13:59:40+00:00</updated>
<author>
<name>Robert Clausecker</name>
<email>fuz@FreeBSD.org</email>
</author>
<published>2023-12-03T11:42:17+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=e4b7b0bcbc741f0998640c2ba55ec00ba613bb75'/>
<id>e4b7b0bcbc741f0998640c2ba55ec00ba613bb75</id>
<content type='text'>
Adapted from the strlcpy() unit tests.

Tested by:	developers@, exp-run
Approved by:	mjg
MFC after:	1 month
MFC to:		stable/14
PR:		275785
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Adapted from the strlcpy() unit tests.

Tested by:	developers@, exp-run
Approved by:	mjg
MFC after:	1 month
MFC to:		stable/14
PR:		275785
</pre>
</div>
</content>
</entry>
<entry>
<title>lib/libc/tests/string: add unit test for strlcpy</title>
<updated>2023-12-25T13:56:02+00:00</updated>
<author>
<name>Robert Clausecker</name>
<email>fuz@FreeBSD.org</email>
</author>
<published>2023-11-09T18:08:23+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=f7098b8659923873a7c60b64cb68182e470786f9'/>
<id>f7098b8659923873a7c60b64cb68182e470786f9</id>
<content type='text'>
A straightforward derivation from the stpncpy unit test.

Sponsored by:	The FreeBSD Foundation
Tested by:	developers@, exp-run
Approved by:	mjg
MFC after:	1 month
MFC to:		stable/14
PR:		275785
Differential Revision:	https://reviews.freebsd.org/D42863
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
A straightforward derivation from the stpncpy unit test.

Sponsored by:	The FreeBSD Foundation
Tested by:	developers@, exp-run
Approved by:	mjg
MFC after:	1 month
MFC to:		stable/14
PR:		275785
Differential Revision:	https://reviews.freebsd.org/D42863
</pre>
</div>
</content>
</entry>
<entry>
<title>lib/libc/tests/string: add unit tests for strncmp(3)</title>
<updated>2023-12-25T13:55:08+00:00</updated>
<author>
<name>Robert Clausecker</name>
<email>fuz@FreeBSD.org</email>
</author>
<published>2023-09-28T20:40:20+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=459ddefcc9dcc010f6f7445285e61e2b6780379c'/>
<id>459ddefcc9dcc010f6f7445285e61e2b6780379c</id>
<content type='text'>
These are patterned after the previously added (D41970)
strcmp tests, but are extended to check for various length
conditions.

Sponsored by:	The FreeBSD Foundation
Tested by:	developers@, exp-run
Approved by:	mjg
MFC after:	1 month
MFC to:		stable/14
PR:		275785
Differential Revision:	https://reviews.freebsd.org/D42122
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
These are patterned after the previously added (D41970)
strcmp tests, but are extended to check for various length
conditions.

Sponsored by:	The FreeBSD Foundation
Tested by:	developers@, exp-run
Approved by:	mjg
MFC after:	1 month
MFC to:		stable/14
PR:		275785
Differential Revision:	https://reviews.freebsd.org/D42122
</pre>
</div>
</content>
</entry>
<entry>
<title>lib/libc/tests/string: add extended unit tests for strcmp()</title>
<updated>2023-11-14T17:37:06+00:00</updated>
<author>
<name>Robert Clausecker</name>
<email>fuz@FreeBSD.org</email>
</author>
<published>2023-09-22T20:42:00+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=b49596de2622a51e5673ba2c0b3718cd88a2aa41'/>
<id>b49596de2622a51e5673ba2c0b3718cd88a2aa41</id>
<content type='text'>
This changeset add a new set of tests that comprehensively test strcmp() on
various alignments of the input. This made it easy to smoke out many
exciting new bugs in the new SSE strcmp() implementation from D41971.

MFC after:	1 week
Reviewed by:	ngie
Sponsored by:	The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D41970
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This changeset add a new set of tests that comprehensively test strcmp() on
various alignments of the input. This made it easy to smoke out many
exciting new bugs in the new SSE strcmp() implementation from D41971.

MFC after:	1 week
Reviewed by:	ngie
Sponsored by:	The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D41970
</pre>
</div>
</content>
</entry>
<entry>
<title>lib/libc/tests/string: expand memcmp test to bcmp, timingsafe_{b,mem}cmp</title>
<updated>2023-10-02T19:25:31+00:00</updated>
<author>
<name>Robert Clausecker</name>
<email>fuz@FreeBSD.org</email>
</author>
<published>2023-08-30T15:30:24+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=c6cc06d465a98270ef734ffec7c9012ec3a1bd17'/>
<id>c6cc06d465a98270ef734ffec7c9012ec3a1bd17</id>
<content type='text'>
The four functions more or less perform the same operation.
Reuse the same unit test with slight changes so we can cover
them all.  Constant-time operation is not verified for the
timingsafe_* functions.

Sponsored by:	The FreeBSD Foundation
Approved by:	ngie
MFC after:	1 week
Differential Revision:	https://reviews.freebsd.org/D41528
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The four functions more or less perform the same operation.
Reuse the same unit test with slight changes so we can cover
them all.  Constant-time operation is not verified for the
timingsafe_* functions.

Sponsored by:	The FreeBSD Foundation
Approved by:	ngie
MFC after:	1 week
Differential Revision:	https://reviews.freebsd.org/D41528
</pre>
</div>
</content>
</entry>
</feed>
