<feed xmlns='http://www.w3.org/2005/Atom'>
<title>src/lib/libc/tests/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: add stdbit test framework and unit tests</title>
<updated>2025-11-30T19:21:52+00:00</updated>
<author>
<name>Robert Clausecker</name>
<email>fuz@FreeBSD.org</email>
</author>
<published>2025-11-18T17:33:12+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=2fb8cbc6ef1b3cc6cd60e5db07f8305623f9b044'/>
<id>2fb8cbc6ef1b3cc6cd60e5db07f8305623f9b044</id>
<content type='text'>
This adds unit tests for all 70 functions in &lt;stdbit.h&gt;.

I'm sorry for the test framework, but it makes it so I don't
have to write 70 unit tests by hand.

Reviewed by:	adrian, des
Approved by:	markj (mentor)
MFC after:	1 month
Differential Revision:	https://reviews.freebsd.org/D53660
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This adds unit tests for all 70 functions in &lt;stdbit.h&gt;.

I'm sorry for the test framework, but it makes it so I don't
have to write 70 unit tests by hand.

Reviewed by:	adrian, des
Approved by:	markj (mentor)
MFC after:	1 month
Differential Revision:	https://reviews.freebsd.org/D53660
</pre>
</div>
</content>
</entry>
<entry>
<title>strptime: Fix day-of-week calculation.</title>
<updated>2024-12-09T12:38:22+00:00</updated>
<author>
<name>Dag-Erling Smørgrav</name>
<email>des@FreeBSD.org</email>
</author>
<published>2024-12-09T12:37:45+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=4285e024baa80f81d13cdcc016fdf0721fe57862'/>
<id>4285e024baa80f81d13cdcc016fdf0721fe57862</id>
<content type='text'>
The day-of-week calculation used the raw year value without adjusting
for TM_YEAR_BASE, so it was off by one for 300 years out of every 400;
it just happened to be correct for 1901 through 2000.  It also used a
loop where a simple addition would have sufficed.

While here, simplify our version of Gauss's algorithm, and document
that we assume the Gregorian calendar.

MFC after:	1 week
PR:		282916
Reviewed by:	imp, allanjude, philip
Differential Revision:	https://reviews.freebsd.org/D47977
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The day-of-week calculation used the raw year value without adjusting
for TM_YEAR_BASE, so it was off by one for 300 years out of every 400;
it just happened to be correct for 1901 through 2000.  It also used a
loop where a simple addition would have sufficed.

While here, simplify our version of Gauss's algorithm, and document
that we assume the Gregorian calendar.

MFC after:	1 week
PR:		282916
Reviewed by:	imp, allanjude, philip
Differential Revision:	https://reviews.freebsd.org/D47977
</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: tests: add testing infrastructure for _FORTIFY_SOURCE</title>
<updated>2024-07-13T05:16:23+00:00</updated>
<author>
<name>Kyle Evans</name>
<email>kevans@FreeBSD.org</email>
</author>
<published>2024-07-13T05:16:10+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=020d003c86367bb5751b6d58fb58611242802c7f'/>
<id>020d003c86367bb5751b6d58fb58611242802c7f</id>
<content type='text'>
The _FORTIFY_SOURCE tests will be generated by a lua script to avoid a
lot of redundancy in writing these tests.  For each function that we're
fortifying, the plan is to test at least the following three scenarios:

 - Writing up to one byte before the end of the buffer,
 - Writing up to the end of the buffer,
 - Writing one byte past the end of the buffer

The buffer is shoved into a struct on the stack to guarantee a stack
layout in which we have a valid byte after the buffer so that level 2
fortification will trip and we can have confidence that it wasn't some
other stack/memory protection instead.

The generated tests are divided roughly into which header we're
attributing them to so that we can parallelize the build -- the full set
is a bit over 9000 lines of C and takes 11s to build on the hardware
that I'm testing on if it's a single monolothic file.

Reviewed by:	markj
Sponsored by:	Klara, Inc.
Sponsored by:	Stormshield
Differential Revision:	https://reviews.freebsd.org/D45678
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The _FORTIFY_SOURCE tests will be generated by a lua script to avoid a
lot of redundancy in writing these tests.  For each function that we're
fortifying, the plan is to test at least the following three scenarios:

 - Writing up to one byte before the end of the buffer,
 - Writing up to the end of the buffer,
 - Writing one byte past the end of the buffer

The buffer is shoved into a struct on the stack to guarantee a stack
layout in which we have a valid byte after the buffer so that level 2
fortification will trip and we can have confidence that it wasn't some
other stack/memory protection instead.

The generated tests are divided roughly into which header we're
attributing them to so that we can parallelize the build -- the full set
is a bit over 9000 lines of C and takes 11s to build on the hardware
that I'm testing on if it's a single monolothic file.

Reviewed by:	markj
Sponsored by:	Klara, Inc.
Sponsored by:	Stormshield
Differential Revision:	https://reviews.freebsd.org/D45678
</pre>
</div>
</content>
</entry>
<entry>
<title>Remove $FreeBSD$: one-line sh pattern</title>
<updated>2023-08-16T17:55:03+00:00</updated>
<author>
<name>Warner Losh</name>
<email>imp@FreeBSD.org</email>
</author>
<published>2023-08-16T17:55:03+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=d0b2dbfa0ecf2bbc9709efc5e20baf8e4b44bbbf'/>
<id>d0b2dbfa0ecf2bbc9709efc5e20baf8e4b44bbbf</id>
<content type='text'>
Remove /^\s*#[#!]?\s*\$FreeBSD\$.*$\n/
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Remove /^\s*#[#!]?\s*\$FreeBSD\$.*$\n/
</pre>
</div>
</content>
</entry>
<entry>
<title>Connect libc/tests/time to the build, adding test cases for strptime()</title>
<updated>2018-10-30T02:37:23+00:00</updated>
<author>
<name>Yuri Pankov</name>
<email>yuripv@FreeBSD.org</email>
</author>
<published>2018-10-30T02:37:23+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=281c29899f18d98535ae1e691b24fd5581f2e60b'/>
<id>281c29899f18d98535ae1e691b24fd5581f2e60b</id>
<content type='text'>
issues fixed recently, and disabling the failing ones (mostly due to TZ
parsing differences with NetBSD).

Reviewed by:	ngie
Approved by:	kib (mentor)
Differential Revision:	https://reviews.freebsd.org/D17546
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
issues fixed recently, and disabling the failing ones (mostly due to TZ
parsing differences with NetBSD).

Reviewed by:	ngie
Approved by:	kib (mentor)
Differential Revision:	https://reviews.freebsd.org/D17546
</pre>
</div>
</content>
</entry>
<entry>
<title>Only build lib/libc/tests/iconv if MK_ICONV != no</title>
<updated>2016-10-21T04:54:43+00:00</updated>
<author>
<name>Enji Cooper</name>
<email>ngie@FreeBSD.org</email>
</author>
<published>2016-10-21T04:54:43+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=aa1a469bcdd10654f81b18df10bcca69388f08a0'/>
<id>aa1a469bcdd10654f81b18df10bcca69388f08a0</id>
<content type='text'>
MFC after:	1 week
Reported by:	damian@damianek.be
Sponsored by:	Dell EMC Isilon
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
MFC after:	1 week
Reported by:	damian@damianek.be
Sponsored by:	Dell EMC Isilon
</pre>
</div>
</content>
</entry>
<entry>
<title>Mark SSP broken on MIPS.</title>
<updated>2016-09-27T09:44:30+00:00</updated>
<author>
<name>Ruslan Bukin</name>
<email>br@FreeBSD.org</email>
</author>
<published>2016-09-27T09:44:30+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=5bec6d5513fd22ffca0f6b6162e51baa81006d00'/>
<id>5bec6d5513fd22ffca0f6b6162e51baa81006d00</id>
<content type='text'>
Sponsored by:	DARPA, AFRL
Sponsored by:	HEIF5
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Sponsored by:	DARPA, AFRL
Sponsored by:	HEIF5
</pre>
</div>
</content>
</entry>
<entry>
<title>Don't build SSP tests on MIPS as we dont have stack-protector</title>
<updated>2016-09-26T15:38:02+00:00</updated>
<author>
<name>Ruslan Bukin</name>
<email>br@FreeBSD.org</email>
</author>
<published>2016-09-26T15:38:02+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=ed8f18ded41b1856f275d2608a555d66fe63286e'/>
<id>ed8f18ded41b1856f275d2608a555d66fe63286e</id>
<content type='text'>
supported on this platform.

Discussed with:	brooks
Sponsored by:	DARPA, AFRL
Sponsored by:	HEIF5
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
supported on this platform.

Discussed with:	brooks
Sponsored by:	DARPA, AFRL
Sponsored by:	HEIF5
</pre>
</div>
</content>
</entry>
<entry>
<title>iconvctl(3): remove superfluous NULL pointer tests</title>
<updated>2016-05-14T00:35:35+00:00</updated>
<author>
<name>Eric van Gyzen</name>
<email>vangyzen@FreeBSD.org</email>
</author>
<published>2016-05-14T00:35:35+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=079171874c9bf263b69e3af10784ad2bcd1fe699'/>
<id>079171874c9bf263b69e3af10784ad2bcd1fe699</id>
<content type='text'>
convname and dst are guaranteed to be non-NULL by iconv_open(3).
src is an array. Remove these tests for NULL pointers.
While I'm here, eliminate a strlcpy with a correct but suspicious-looking
calculation for the third parameter (i.e. not a simple sizeof).
Compare the strings in-place instead of copying.

Found by:	bdrewery
Found by:	Coverity
CID:		1130050, 1130056
MFC after:	3 days
Sponsored by:	Dell Inc.
Differential Revision:	 https://reviews.freebsd.org/D6338
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
convname and dst are guaranteed to be non-NULL by iconv_open(3).
src is an array. Remove these tests for NULL pointers.
While I'm here, eliminate a strlcpy with a correct but suspicious-looking
calculation for the third parameter (i.e. not a simple sizeof).
Compare the strings in-place instead of copying.

Found by:	bdrewery
Found by:	Coverity
CID:		1130050, 1130056
MFC after:	3 days
Sponsored by:	Dell Inc.
Differential Revision:	 https://reviews.freebsd.org/D6338
</pre>
</div>
</content>
</entry>
</feed>
