|
Revision tags: release/15.1.0-p2, release/15.0.0-p12, release/14.4.0-p8 |
|
| #
31f9f09b |
| 19-Jul-2026 |
Jitendra Bhati <bhatijitendra2022@gmail.com> |
fts: add fts_capsicum_test.c
Add three test cases verifying fts(3) Capsicum capability mode:
- fts_dirfd_valid: verifies fts_dirfd is set for all non-root entries and openat(fts_dirfd, fts_name)
fts: add fts_capsicum_test.c
Add three test cases verifying fts(3) Capsicum capability mode:
- fts_dirfd_valid: verifies fts_dirfd is set for all non-root entries and openat(fts_dirfd, fts_name) identifies the same inode as fts_accpath - fts_dirfd_capsicum: verifies complete fts traversal works in Capsicum capability mode using fts_openat() and fts_dirfd - fts_dirfd_deep_tree: verifies fts_dirfd + fts_name is correct at all directory depths (7 non-root entries)
Sponsored by: Google LLC (GSoC 2026) Reviewed by: asomers Pull Request: https://github.com/freebsd/freebsd-src/pull/2332
show more ...
|
|
Revision tags: release/15.0.0-p11, release/14.3.0-p16, release/14.4.0-p7, release/15.1.0-p1 |
|
| #
9aed7a77 |
| 12-Jun-2026 |
Jitendra Bhati <bhatijitendra2022@gmail.com> |
fts: add fts_openat() API
Add fts_openat() as a new entry point for fts(3).
When dirfd is AT_FDCWD the behaviour is identical to fts_open(). Passing a pre-opened directory fd allows fts traversal i
fts: add fts_openat() API
Add fts_openat() as a new entry point for fts(3).
When dirfd is AT_FDCWD the behaviour is identical to fts_open(). Passing a pre-opened directory fd allows fts traversal inside Capsicum capability mode where path-based operations are not permitted.
Capability mode users should use fts_parent->fts_dirfd + fts_name with openat(2) to access files.
Reviewed by: asomers Relnotes: yes Sponsored by: Google LLC (GSoC 2026) Pull Request: https://github.com/freebsd/freebsd-src/pull/2273
show more ...
|
| #
3de9dc5b |
| 30-Jun-2026 |
Kyle Evans <kevans@FreeBSD.org> |
libc: gen: add a test for rtld underflowing our posix_spawn thread
This is a distillation of the environment described in the PR, using a dummy shlib and mapping it repeatedly. This takes advantage
libc: gen: add a test for rtld underflowing our posix_spawn thread
This is a distillation of the environment described in the PR, using a dummy shlib and mapping it repeatedly. This takes advantage of the guard page added in 2767a1f3686e5b16 to reliably crash if rtld tries to scale its stack usage excessively with the # DSOs loaded.
PR: 295991 Reviewed by: kib Differential Revision: https://reviews.freebsd.org/D57954
show more ...
|
| #
255538cd |
| 15-Jun-2026 |
Piotr Kubaj <pkubaj@FreeBSD.org> |
powerpc64le: switch long double to IEEE binary128
Change powerpc64le's long double from 64-bit double to IEEE 754 binary128 (quad, 113-bit mantissa), matching aarch64 and riscv64.
Gated on FreeBSD
powerpc64le: switch long double to IEEE binary128
Change powerpc64le's long double from 64-bit double to IEEE 754 binary128 (quad, 113-bit mantissa), matching aarch64 and riscv64.
Gated on FreeBSD 16 and powerpc64le only.
Differential Revision: https://reviews.freebsd.org/D57388 Reviewed by: adrian Relnotes: yes
show more ...
|
|
Revision tags: release/15.1.0, release/15.0.0-p10, release/14.4.0-p6, release/14.3.0-p15, release/14.4.0-p5, release/14.3.0-p14, release/15.0.0-p9, release/14.4.0-p4, release/14.3.0-p13, release/13.5.0-p14, release/15.0.0-p8, release/14.4.0-p3, release/14.3.0-p12, release/13.5.0-p13, release/15.0.0-p7, release/13.5.0-p12, release/14.3.0-p11, release/14.4.0-p2, release/15.0.0-p6, release/13.5.0-p11, release/14.3.0-p10, release/14.4.0-p1, release/15.0.0-p5, release/14.4.0, release/13.5.0-p10, release/14.3.0-p9, release/15.0.0-p4, release/15.0.0-p3, release/13.5.0-p9, release/15.0.0-p2, release/14.3.0-p8, release/15.0.0-p1, release/13.5.0-p8, release/14.3.0-p7, release/15.0.0, release/14.3.0-p6, release/13.5.0-p7, release/13.5.0-p6, release/14.3.0-p5, release/13.5.0-p5, release/14.2.0-p7, release/14.3.0-p4, release/14.3.0-p3, release/14.2.0-p6, release/13.5.0-p4, release/13.5.0-p3, release/14.2.0-p5, release/14.3.0-p2, release/14.3.0-p1, release/14.2.0-p4, release/13.5.0-p2, release/14.3.0, release/13.4.0-p5, release/13.5.0-p1, release/14.2.0-p3 |
|
| #
85e449cf |
| 10-Apr-2025 |
K Rin <rin@sandb0x.tw> |
libc/tests: copy ieeefp tests out from contrib/netbsd-tests and rename them as FreeBSD test convention.
Reviewed by: imp Pull Request: https://github.com/freebsd/freebsd-src/pull/1656
|
| #
670738a1 |
| 03-Jun-2026 |
Jitendra Bhati <bhatijitendra2022@gmail.com> |
fts: add fts regression tests
Add ATF regression tests for previously-fixed fts(3) bugs:
- PR 45723: directory with read but no execute is traversed via FTS_DONTCHDIR fallback, not silently skipp
fts: add fts regression tests
Add ATF regression tests for previously-fixed fts(3) bugs:
- PR 45723: directory with read but no execute is traversed via FTS_DONTCHDIR fallback, not silently skipped (commit 1e03bff7f2b7) - PR 196724: FTS_SLNONE must not be returned for a non-symlink; time-bounded race test runs for 1 second with concurrent file creation/deletion (commit bf4374c54589) - PR 262038: readdir(2) errors produce FTS_DNR with fts_errno set, not silently treated as end-of-directory (commit 0cff70ca6654) - SVN r246641: normal traversal works correctly with O_DIRECTORY fix in fts_safe_changedir() (commit f9928f1705ee) - SVN r261589: no crash when tree modified during traversal; time-bounded race test runs for 1 second with concurrent file creation/deletion (commit c6d38f088e5c)
Sponsored by: Google LLC (GSoC 2026) Reviewed by: asomers MFC after: 2 weeks Pull Request: https://github.com/freebsd/freebsd-src/pull/2257
show more ...
|
| #
940142d6 |
| 20-May-2026 |
Jitendra Bhati <bhatijitendra2022@gmail.com> |
lib/libc/tests/gen: add fts_set() tests
Add ATF test cases for fts_set():
fts_set: - invalid instruction returns non-zero with EINVAL - FTS_AGAIN revisits the current node - FTS_AGAIN consecutive v
lib/libc/tests/gen: add fts_set() tests
Add ATF test cases for fts_set():
fts_set: - invalid instruction returns non-zero with EINVAL - FTS_AGAIN revisits the current node - FTS_AGAIN consecutive visits node three times - FTS_FOLLOW on symlink to file yields FTS_F - FTS_FOLLOW on symlink to directory causes descent - FTS_FOLLOW on dead symlink yields FTS_SLNONE - FTS_SKIP prevents descent into directory - fts_set_clientptr/fts_get_clientptr round-trip - fts_get_stream returns parent FTS* from FTSENT*
Sponsored by: Google LLC (GSoC 2026) Reviewed by: asomers MFC after: 2 weeks Pull Request: https://github.com/freebsd/freebsd-src/pull/2242
show more ...
|
| #
e624417d |
| 21-May-2026 |
Jitendra Bhati <bhatijitendra2022@gmail.com> |
lib/libc/tests/gen: add fts_children() tests
Add ATF test cases covering fts_children() behaviour:
- before fts_read returns root entry list - empty directory returns NULL with errno 0 - non-empty
lib/libc/tests/gen: add fts_children() tests
Add ATF test cases covering fts_children() behaviour:
- before fts_read returns root entry list - empty directory returns NULL with errno 0 - non-empty directory returns all children in order - called twice returns equivalent results - FTS_NAMEONLY fills only fts_name, fts_info is FTS_NSOK - non-directory node returns NULL with errno 0 - invalid options returns NULL with EINVAL
Sponsored by: Google LLC (GSoC 2026) Reviewed by: asomers MFC after: 1 week Pull Request: https://github.com/freebsd/freebsd-src/pull/2218
show more ...
|
| #
113c262b |
| 21-May-2026 |
Jitendra Bhati <bhatijitendra2022@gmail.com> |
lib/libc/tests/gen: add fts_open() error and edge case tests
Add ATF test cases covering fts_open() error conditions and edge cases:
- invalid option bits (outside FTS_OPTIONMASK) yield EINVAL - em
lib/libc/tests/gen: add fts_open() error and edge case tests
Add ATF test cases covering fts_open() error conditions and edge cases:
- invalid option bits (outside FTS_OPTIONMASK) yield EINVAL - empty argv yields EINVAL - empty path string yields FTS_NS with ENOENT - nonexistent path yields FTS_NS, not open failure - trailing slash does not crash (SVN r49851 regression) - unreadable directory yields FTS_D then FTS_DNR, never FTS_DP - multiple root paths are all visited left to right
Sponsored by: Google LLC (GSoC 2026) Reviewed by: asomers MFC after: 1 week Pull Request: https://github.com/freebsd/freebsd-src/pull/2217
show more ...
|
| #
4a1c7529 |
| 19-Nov-2025 |
Robert Clausecker <fuz@FreeBSD.org> |
libc/tests: add test for *_MAX, *_MIN, and *_WIDTH
This file checks the correctness of the various _MAX, _MIN, and _WIDTH macros defined for the libc types. It assumes that none of the types have p
libc/tests: add test for *_MAX, *_MIN, and *_WIDTH
This file checks the correctness of the various _MAX, _MIN, and _WIDTH macros defined for the libc types. It assumes that none of the types have padding bits.
Approved by: markj (mentor) MFC after: 1 month Differential Revision: https://reviews.freebsd.org/D53831
show more ...
|
| #
c08e019c |
| 08-Jul-2025 |
Dag-Erling Smørgrav <des@FreeBSD.org> |
opendir, fdopendir: Add tests, clean up.
* Add test cases for opendir() and fdopendir(). * Drop O_NONBLOCK from opendir(); it was added a long time ago to avoid blocking if given a closed named pi
opendir, fdopendir: Add tests, clean up.
* Add test cases for opendir() and fdopendir(). * Drop O_NONBLOCK from opendir(); it was added a long time ago to avoid blocking if given a closed named pipe, but now we use O_DIRECTORY, which ensures that we get ENOTDIR in that case. * While here, remove unused #includes left over from the split.
Sponsored by: Klara, Inc. Reviewed by: kevans, markj Differential Revision: https://reviews.freebsd.org/D51126
show more ...
|
| #
8d02b719 |
| 02-Jul-2025 |
Dag-Erling Smørgrav <des@FreeBSD.org> |
fts: Add test cases for unreadable directories.
Sponsored by: Klara, Inc. Reviewed by: kevans Differential Revision: https://reviews.freebsd.org/D51098
|
| #
deeebfde |
| 20-Jun-2025 |
Dag-Erling Smørgrav <des@FreeBSD.org> |
libc: Add fscandir(), fscandir_b(), scandirat_b().
While here, clean up scandir() a bit and improve the documentation.
MFC after: never Sponsored by: Klara, Inc. Reviewed by: markj Differential Rev
libc: Add fscandir(), fscandir_b(), scandirat_b().
While here, clean up scandir() a bit and improve the documentation.
MFC after: never Sponsored by: Klara, Inc. Reviewed by: markj Differential Revision: https://reviews.freebsd.org/D50935
show more ...
|
| #
d580567d |
| 15-May-2025 |
Ricardo Branco <rbranco@suse.de> |
Add tests for sig2str() / str2sig()
Reviewed by: imp, kib, des, jilles Pull Request: https://github.com/freebsd/freebsd-src/pull/1696
|
| #
4d7c31bc |
| 23-May-2025 |
Bojan Novković <bnovkov@FreeBSD.org> |
glob2_test: Add tests for error callback functions and blocks
This change adds tests that check basic callback functionality for blocks and function pointers. The tests also make sure that GLOB_ERR
glob2_test: Add tests for error callback functions and blocks
This change adds tests that check basic callback functionality for blocks and function pointers. The tests also make sure that GLOB_ERR overrides the callback's return value.
Sponsored by: Klara, Inc. Differential Revision: https://reviews.freebsd.org/D50486
show more ...
|
| #
d30a84ab |
| 08-May-2025 |
Dag-Erling Smørgrav <des@FreeBSD.org> |
fts: Rename fts_options to fts_options_test
Sponsored by: Klara, Inc.
|
| #
d2da6ed9 |
| 08-May-2025 |
Dag-Erling Smørgrav <des@FreeBSD.org> |
fts: Add tests for most FTS options.
Sponsored by: Klara, Inc. Reviewed by: kevans, imp Differential Revision: https://reviews.freebsd.org/D50234
|
| #
12668ead |
| 22-Apr-2025 |
Dag-Erling Smørgrav <des@FreeBSD.org> |
bsd.compiler.mk: Add a blocks compiler feature.
Sponsored by: Klara, Inc. Reviewed by: jrtc27 Differential Revision: https://reviews.freebsd.org/D49963
|
| #
f0ac5e91 |
| 22-Apr-2025 |
Dag-Erling Smørgrav <des@FreeBSD.org> |
fts: Add blocks support.
This adds an `fts_open_b()` variant of `fts_open()` which takes a block instead of a function pointer.
This was inspired by, and is intended to be compatible with, Apple's
fts: Add blocks support.
This adds an `fts_open_b()` variant of `fts_open()` which takes a block instead of a function pointer.
This was inspired by, and is intended to be compatible with, Apple's implementation; however, although our FTS and theirs share a common ancestor, they have diverged significantly. That and the fact that we still target compilers which don't support blocks means Apple's implementation was not directly reusable.
This is the second use case for blocks in FreeBSD (the first being `qsort_b()`, which we use here). This suggest we might want to add a `COMPILER_FEATURE` for blocks to avoid hardcoding any further `COMPILER_TYPE` checks.
MFC after: never Relnotes: yes Sponsored by: Klara, Inc. Reviewed by: kevans, theraven, imp Differential Revision: https://reviews.freebsd.org/D49877
show more ...
|
|
Revision tags: release/13.5.0, release/14.2.0-p2, release/14.1.0-p8, release/13.4.0-p4, release/14.1.0-p7, release/14.2.0-p1, release/13.4.0-p3, release/14.2.0, release/13.4.0 |
|
| #
e9ac4169 |
| 15-Jul-2024 |
Warner Losh <imp@FreeBSD.org> |
Remove residual blank line at start of Makefile
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
|
|
Revision tags: release/14.1.0, release/13.3.0, release/14.0.0 |
|
| #
d0b2dbfa |
| 16-Aug-2023 |
Warner Losh <imp@FreeBSD.org> |
Remove $FreeBSD$: one-line sh pattern
Remove /^\s*#[#!]?\s*\$FreeBSD\$.*$\n/
|
|
Revision tags: release/13.2.0, release/12.4.0, release/13.1.0, release/12.3.0, release/13.0.0 |
|
| #
9e1281ea |
| 31-Dec-2020 |
Kyle Evans <kevans@FreeBSD.org> |
libc: tests: hook CPUSET(9) test up to the build
Add shims to map NetBSD's API to CPUSET(9). Obviously the invalid input parts of these tests are relatively useless since we're just testing the shim
libc: tests: hook CPUSET(9) test up to the build
Add shims to map NetBSD's API to CPUSET(9). Obviously the invalid input parts of these tests are relatively useless since we're just testing the shims that aren't used elsewhere, there's still some amount of value in the parts testing valid inputs.
Differential Revision: https://reviews.freebsd.org/D27307
show more ...
|
|
Revision tags: release/12.2.0 |
|
| #
2d143336 |
| 24-Jun-2020 |
Mitchell Horne <mhorne@FreeBSD.org> |
Enable long double tests on RISC-V
Some of the NetBSD contributed tests are gated behind the __HAVE_LONG_DOUBLE flag. This flag seems to be defined only for platforms whose long double is larger tha
Enable long double tests on RISC-V
Some of the NetBSD contributed tests are gated behind the __HAVE_LONG_DOUBLE flag. This flag seems to be defined only for platforms whose long double is larger than their double. I could not find this explicitly documented anywhere, but it is implied by the definitions in NetBSD's sys/arch/${arch}/include/math.h headers, and the following assertion from the UBSAN code:
#ifdef __HAVE_LONG_DOUBLE long double LD; ASSERT(sizeof(LD) > sizeof(uint64_t)); #endif
RISC-V has 128-bit long doubles, so enable the tests on this platform, and update the comments to better explain the purpose of this flag.
Reviewed by: ngie MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D25419
show more ...
|
|
Revision tags: release/11.4.0 |
|
| #
301cb491 |
| 10-Jun-2020 |
Kyle Evans <kevans@FreeBSD.org> |
execvp: fix up the ENOEXEC fallback
If execve fails with ENOEXEC, execvp is expected to rebuild the command with /bin/sh instead and try again.
The previous version did this, but overlooked two det
execvp: fix up the ENOEXEC fallback
If execve fails with ENOEXEC, execvp is expected to rebuild the command with /bin/sh instead and try again.
The previous version did this, but overlooked two details:
argv[0] can conceivably be NULL, in which case memp would never get terminated. We must allocate no less than three * sizeof(char *) so we can properly terminate at all times. For the non-NULL argv standard case, we count all the non-NULL elements and actually skip the first argument, so we end up capturing the NULL terminator in our bcopy().
The second detail is that the spec is actually worded such that we should have been preserving argv[0] as passed to execvp:
"[...] executed command shall be as if the process invoked the sh utility using execl() as follows:
execl(<shell path>, arg0, file, arg1, ..., (char *)0);
where <shell path> is an unspecified pathname for the sh utility, file is the process image file, and for execvp(), where arg0, arg1, and so on correspond to the values passed to execvp() in argv[0], argv[1], and so on."
So we make this change at this time as well, while we're already touching it. We decidedly can't preserve a NULL argv[0] as this would be incredibly, incredibly fragile, so we retain our legacy behavior of using "sh" for argv[] in this specific instance.
Some light tests are added to try and detect some components of handling the ENOEXEC fallback; posix_spawnp_enoexec_fallback_null_argv0 is likely not 100% reliable, but it at least won't raise false-alarms and it did result in useful failures with pre-change libc on my machine.
This is a secondary change in D25038.
Reported by: Andrew Gierth <andrew_tao173.riddles.org.uk> Reviewed by: jilles, kib, Andrew Gierth MFC after: 1 week
show more ...
|
| #
7dc859a5 |
| 12-Dec-2019 |
Kyle Evans <kevans@FreeBSD.org> |
Add sigsetop extensions commonly found in musl libc and glibc
These functions (sigandset, sigisemptyset, sigorset) are commonly available in at least musl libc and glibc; sigorset, at least, has pro
Add sigsetop extensions commonly found in musl libc and glibc
These functions (sigandset, sigisemptyset, sigorset) are commonly available in at least musl libc and glibc; sigorset, at least, has proven quite useful in qemu-bsd-user work for tracking the current process signal mask in a more self-documenting/aesthetically pleasing manner.
Reviewed by: bapt, jilles, pfg MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D22187
show more ...
|