<feed xmlns='http://www.w3.org/2005/Atom'>
<title>src/lib/libc/tests/db, branch main</title>
<subtitle>FreeBSD source tree</subtitle>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/'/>
<entry>
<title>libc/dbm: Differentiate between uninitialized and end-of-db cursors</title>
<updated>2026-06-20T14:27:44+00:00</updated>
<author>
<name>Bojan Novković</name>
<email>bnovkov@FreeBSD.org</email>
</author>
<published>2026-06-19T15:24:05+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=f879eb3febb6c294d684e8e7fecd5cc396ec5a28'/>
<id>f879eb3febb6c294d684e8e7fecd5cc396ec5a28</id>
<content type='text'>
Commit `3a686b851f8f` fixed a `dbm_nextkey` edge case when using
the function after reaching the end of the database, but it inadvertently
broke the following `R_NEXT` behaviour:
"If the cursor is not yet set, this is the same as the R_FIRST flag."

Fix this by adding a new cursor constant that allows us to differentiate
between an unset cursor and a cursor that overflowed.

Reported by:	ae
Fixes:	3a686b851f8f
Sponsored by:	Klara, Inc.
Differential Revision:	https://reviews.freebsd.org/D57670
Reviewed by:	markj
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Commit `3a686b851f8f` fixed a `dbm_nextkey` edge case when using
the function after reaching the end of the database, but it inadvertently
broke the following `R_NEXT` behaviour:
"If the cursor is not yet set, this is the same as the R_FIRST flag."

Fix this by adding a new cursor constant that allows us to differentiate
between an unset cursor and a cursor that overflowed.

Reported by:	ae
Fixes:	3a686b851f8f
Sponsored by:	Klara, Inc.
Differential Revision:	https://reviews.freebsd.org/D57670
Reviewed by:	markj
</pre>
</div>
</content>
</entry>
<entry>
<title>dbm_nextkey: Always return an error if we've reached the end of the database</title>
<updated>2025-07-31T15:27:24+00:00</updated>
<author>
<name>Bojan Novković</name>
<email>bnovkov@FreeBSD.org</email>
</author>
<published>2025-07-30T14:39:54+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=3a686b851f8fda625010859d210c8a5615ea93fc'/>
<id>3a686b851f8fda625010859d210c8a5615ea93fc</id>
<content type='text'>
POSIX.1 states that `dbm_nextkey` must return an invalid key
(i.e., `key.dptr == NULL`) after the end of the database was reached.
The current implementation of `hash_seq` will incorrectly restart
the key sequence after the end of the database is reached.

Fix this by checking the "current bucket" index when R_NEXT is passed.

Sponsored by:   Klara, Inc.
Differential Revision:	https://reviews.freebsd.org/D51635
Reviewed by:	markj
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
POSIX.1 states that `dbm_nextkey` must return an invalid key
(i.e., `key.dptr == NULL`) after the end of the database was reached.
The current implementation of `hash_seq` will incorrectly restart
the key sequence after the end of the database is reached.

Fix this by checking the "current bucket" index when R_NEXT is passed.

Sponsored by:   Klara, Inc.
Differential Revision:	https://reviews.freebsd.org/D51635
Reviewed by:	markj
</pre>
</div>
</content>
</entry>
<entry>
<title>db/hash.c: Allow O_WRONLY in dbm_open</title>
<updated>2025-07-30T09:31:16+00:00</updated>
<author>
<name>Bojan Novković</name>
<email>bnovkov@FreeBSD.org</email>
</author>
<published>2025-07-25T09:01:52+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=14598537acecb512432e33e001762c912cc25799'/>
<id>14598537acecb512432e33e001762c912cc25799</id>
<content type='text'>
The dbm(3) manpage explicitly states that O_WRONLY is not allowed in
dbm_open, but a more recent comment in ` __hash_open` suggests otherwise.
Furthermore, POSIX.1 allows O_WRONLY in dbm_open and states
that the underlying file must be opened for both reading and writing.

Fix this by correcting the O_WRONLY check and moving it further into
the function to make sure that the original flags are stored in hashp.

Sponsored by:   Klara, Inc.
Reviewed by:	markj
Differential Revision:	https://reviews.freebsd.org/D51514
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The dbm(3) manpage explicitly states that O_WRONLY is not allowed in
dbm_open, but a more recent comment in ` __hash_open` suggests otherwise.
Furthermore, POSIX.1 allows O_WRONLY in dbm_open and states
that the underlying file must be opened for both reading and writing.

Fix this by correcting the O_WRONLY check and moving it further into
the function to make sure that the original flags are stored in hashp.

Sponsored by:   Klara, Inc.
Reviewed by:	markj
Differential Revision:	https://reviews.freebsd.org/D51514
</pre>
</div>
</content>
</entry>
<entry>
<title>dbm: Add tests for dbm_open</title>
<updated>2025-07-25T09:23:00+00:00</updated>
<author>
<name>Bojan Novković</name>
<email>bnovkov@FreeBSD.org</email>
</author>
<published>2025-07-24T15:23:51+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=e1e77dd23cedc6d19e48e03d9454c5a3d552ed50'/>
<id>e1e77dd23cedc6d19e48e03d9454c5a3d552ed50</id>
<content type='text'>
Sponsored by:   Klara, Inc.
Reviewed by:	markj
Differential Revision:	https://reviews.freebsd.org/D51492
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Sponsored by:   Klara, Inc.
Reviewed by:	markj
Differential Revision:	https://reviews.freebsd.org/D51492
</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>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>DIRDEPS_BUILD: Update dependencies.</title>
<updated>2017-10-31T00:07:04+00:00</updated>
<author>
<name>Bryan Drewery</name>
<email>bdrewery@FreeBSD.org</email>
</author>
<published>2017-10-31T00:07:04+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=ea825d02749f382c3f7e17f28247f20a48733eab'/>
<id>ea825d02749f382c3f7e17f28247f20a48733eab</id>
<content type='text'>
Sponsored by:	Dell EMC Isilon
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Sponsored by:	Dell EMC Isilon
</pre>
</div>
</content>
</entry>
<entry>
<title>Upgrade NetBSD tests to 01.11.2017_23.20 snapshot</title>
<updated>2017-01-13T03:33:57+00:00</updated>
<author>
<name>Enji Cooper</name>
<email>ngie@FreeBSD.org</email>
</author>
<published>2017-01-13T03:33:57+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=cdebaff820b2a4915a16cedfd511823d78aab171'/>
<id>cdebaff820b2a4915a16cedfd511823d78aab171</id>
<content type='text'>
This contains some new testcases in /usr/tests/...:

- .../lib/libc
- .../lib/libthr
- .../lib/msun
- .../sys/kern

Tested on:	amd64, i386
MFC after:	1 month
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This contains some new testcases in /usr/tests/...:

- .../lib/libc
- .../lib/libthr
- .../lib/msun
- .../sys/kern

Tested on:	amd64, i386
MFC after:	1 month
</pre>
</div>
</content>
</entry>
<entry>
<title>Install h_db to unbreak some of the lib/libc/db testcases after</title>
<updated>2016-09-06T00:51:25+00:00</updated>
<author>
<name>Enji Cooper</name>
<email>ngie@FreeBSD.org</email>
</author>
<published>2016-09-06T00:51:25+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=b8cc28b78238d8599090b47dbae059963c1f027b'/>
<id>b8cc28b78238d8599090b47dbae059963c1f027b</id>
<content type='text'>
r305358

MFC after:	59 days
X-MFC with:	r305358
Reported by:	Jenkins, rodrigc
Sponsored by:	EMC / Isilon Storage Division
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
r305358

MFC after:	59 days
X-MFC with:	r305358
Reported by:	Jenkins, rodrigc
Sponsored by:	EMC / Isilon Storage Division
</pre>
</div>
</content>
</entry>
<entry>
<title>Checkpoint initial integration work</title>
<updated>2016-08-12T08:50:05+00:00</updated>
<author>
<name>Enji Cooper</name>
<email>ngie@FreeBSD.org</email>
</author>
<published>2016-08-12T08:50:05+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=640235e2c2ba32947f7c59d168437ffa1280f1e6'/>
<id>640235e2c2ba32947f7c59d168437ffa1280f1e6</id>
<content type='text'>
- Some of the lib/libc and lib/thr tests fail
- lib/msun/exp_test:exp2_values now passes with clang 3.8.0

The Makefiles in contrib/netbsd-tests were pruned as they have no value

Sponsored by: EMC / Isilon Storage Division
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
- Some of the lib/libc and lib/thr tests fail
- lib/msun/exp_test:exp2_values now passes with clang 3.8.0

The Makefiles in contrib/netbsd-tests were pruned as they have no value

Sponsored by: EMC / Isilon Storage Division
</pre>
</div>
</content>
</entry>
</feed>
