<feed xmlns='http://www.w3.org/2005/Atom'>
<title>src/lib/libc/tests, branch main</title>
<subtitle>FreeBSD source tree</subtitle>
<id>https://cgit-dev.freebsd.org/src/atom?h=main</id>
<link rel='self' href='https://cgit-dev.freebsd.org/src/atom?h=main'/>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/'/>
<updated>2026-05-01T02:58:48Z</updated>
<entry>
<title>tests: fix remaining test failures under _FORTIFY_SOURCE</title>
<updated>2026-05-01T02:58:48Z</updated>
<author>
<name>Kyle Evans</name>
<email>kevans@FreeBSD.org</email>
</author>
<published>2026-05-01T02:57:51Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=910f78a5143af32dfcb237a463397aa0c31c07df'/>
<id>urn:sha1:910f78a5143af32dfcb237a463397aa0c31c07df</id>
<content type='text'>
The getgroups test is a NetBSD tests, so just apply our larger hammer
and disable the feature entirely.  The audit test can take a more
surgical approach and use __ssp_real() appropriately, since it's a local
one.

PR:		294881
Reviewed by:	markj
Differential Revision:	https://reviews.freebsd.org/D56735
</content>
</entry>
<entry>
<title>libc/tests/string: add a more comprehensive unit test for strrchr()</title>
<updated>2026-04-08T13:21:50Z</updated>
<author>
<name>Robert Clausecker</name>
<email>fuz@FreeBSD.org</email>
</author>
<published>2026-03-22T21:39:42Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=8b5d77bbcbd98e684226950be1c779e108059d8d'/>
<id>urn:sha1: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>
</entry>
<entry>
<title>libc: Fix cxa_thread_atexit{,nothr} test.</title>
<updated>2026-03-22T02:48:24Z</updated>
<author>
<name>ShengYi Hung</name>
<email>aokblast@FreeBSD.org</email>
</author>
<published>2026-03-17T14:53:08Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=c25976f0a9a3a102ce47b45c19b2c93e8069433b'/>
<id>urn:sha1:c25976f0a9a3a102ce47b45c19b2c93e8069433b</id>
<content type='text'>
After patch 9d26b82, we don't provide recursive call protection anymore.
Therefore, to pass the test, we adjust the testcase by protecting on
caller and the testcase is to make sure the dtors is properly handled.

Reported by:    siva
Reviewed by:    kib
Approved by:    markj (mentor)
Fixes:  9d26b82826d9 ("libc: Fix dtor order in __cxa_thread_atexit")
MFC after:      2 weeks
Sponsored by:   The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D55893
</content>
</entry>
<entry>
<title>system(3): Fix brain glitch in previous commit</title>
<updated>2026-03-09T21:01:41Z</updated>
<author>
<name>Dag-Erling Smørgrav</name>
<email>des@FreeBSD.org</email>
</author>
<published>2026-03-09T21:00:52Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=863b5c137a98d29dc6964cba0e0c4fe2a8bebab8'/>
<id>urn:sha1:863b5c137a98d29dc6964cba0e0c4fe2a8bebab8</id>
<content type='text'>
We were saving SIGINT twice instead of SIGINT and SIGQUIT.

Also restore original order of operations (SIGINT then SIGQUIT), which
matches the order in which they're discussed in the POSIX description
of system(3).

MFC after:	1 week
Sponsored by:	Klara, Inc.
Fixes:		48368f702423 ("system(3): Address test robustness issue")
</content>
</entry>
<entry>
<title>system(3): Address test robustness issue</title>
<updated>2026-03-09T20:41:04Z</updated>
<author>
<name>Dag-Erling Smørgrav</name>
<email>des@FreeBSD.org</email>
</author>
<published>2026-03-09T20:41:04Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=48368f702423742b2a7dff7ad3191625e8bf26f0'/>
<id>urn:sha1:48368f702423742b2a7dff7ad3191625e8bf26f0</id>
<content type='text'>
Don't assume that SIGINT and SIGQUIT are set to SIG_DFL at the start
of the test.  Instead, retrieve their current dispositions and verify
that they are restored at the end of the test.

MFC after:	1 week
Sponsored by:	Klara, Inc.
Reviewed by:	kevans
Differential Revision:	https://reviews.freebsd.org/D55709
</content>
</entry>
<entry>
<title>system(3): Fix null case</title>
<updated>2026-02-25T21:12:42Z</updated>
<author>
<name>Dag-Erling Smørgrav</name>
<email>des@FreeBSD.org</email>
</author>
<published>2026-02-25T21:12:42Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=8ae3f44991948cc97b09adc248a9a46db71bf9e0'/>
<id>urn:sha1:8ae3f44991948cc97b09adc248a9a46db71bf9e0</id>
<content type='text'>
Our manual page states that if given a null pointer, system() returns
non-zero if the shell is available and zero if it is not.  This is
consistent with the C standard's description of system(), but it is not
what we actually do.  What we actually do is always return non-zero, as
required by POSIX.

As the POSIX rationale explains, implementing the logic required by the
C standard does not violate POSIX, since a conforming system always has
a shell, therefore the logic will always return non-zero.

Since our libc is commonly used in non-conforming situations such as
chroots or thin jails, we should implement the full logic required by
the C standard.

MFC after:	1 week
Sponsored by:	Klara, Inc.
Reviewed by:	obiwac, bnovkov, kevans
Differential Revision:	https://reviews.freebsd.org/D55484
</content>
</entry>
<entry>
<title>system(3): Write our own tests</title>
<updated>2026-02-25T21:12:29Z</updated>
<author>
<name>Dag-Erling Smørgrav</name>
<email>des@FreeBSD.org</email>
</author>
<published>2026-02-25T21:12:29Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=7a1ade5109ac57d1f59eaa75b5d0f13fabecf6ba'/>
<id>urn:sha1:7a1ade5109ac57d1f59eaa75b5d0f13fabecf6ba</id>
<content type='text'>
Replace the somewhat perfunctory NetBSD tests with our own.

MFC after:	1 week
Sponsored by:	Klara, Inc.
Reviewed by:	bnovkov, kevans
Differential Revision:	https://reviews.freebsd.org/D55482
</content>
</entry>
<entry>
<title>libc/tests: Clean up *dir() tests</title>
<updated>2026-02-03T14:39:32Z</updated>
<author>
<name>Dag-Erling Smørgrav</name>
<email>des@FreeBSD.org</email>
</author>
<published>2026-02-03T14:39:21Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=d70b9eb74fc4aa430bd2ff4bca37e6a9b6c8004f'/>
<id>urn:sha1:d70b9eb74fc4aa430bd2ff4bca37e6a9b6c8004f</id>
<content type='text'>
Mainly, avoid reusing the name of one of the functions we should be
testing (but aren't) for local variables.

Sponsored by:	Klara, Inc.
Reviewed by:	markj
Differential Revision:	https://reviews.freebsd.org/D55054
</content>
</entry>
<entry>
<title>tdestroy(3): add tests</title>
<updated>2025-12-29T17:18:55Z</updated>
<author>
<name>Konstantin Belousov</name>
<email>kib@FreeBSD.org</email>
</author>
<published>2025-12-26T22:00:09Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=3204c097fd08436805f059c0d7f676d29ee9bb62'/>
<id>urn:sha1:3204c097fd08436805f059c0d7f676d29ee9bb62</id>
<content type='text'>
Reviewed by:	alc, emaste
Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
Differential revision:	https://reviews.freebsd.org/D54365
</content>
</entry>
<entry>
<title>libc/test: fix typo</title>
<updated>2025-12-14T17:06:40Z</updated>
<author>
<name>Robert Clausecker</name>
<email>fuz@FreeBSD.org</email>
</author>
<published>2025-12-14T17:05:07Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=8be8642826099368208efb2c1222f2a102cc5b08'/>
<id>urn:sha1:8be8642826099368208efb2c1222f2a102cc5b08</id>
<content type='text'>
I misapplied ngie's recommended correction.

Fixes:	123c086200491819595abc271d360e605288fd18
Differential Revision:	https://reviews.freebsd.org/D54169
</content>
</entry>
</feed>
