| #
1.61 |
|
15-Sep-2025 |
riastradh |
ctype(3): New environment variable LIBC_ALLOWCTYPEABUSE.
If set, this does not force the ctype(3) functions to crash when passed invalid inputs -- instead, they will return nonsense results, and possibly print warnings to stderr, as is their right in implementing undefined behaviour.
The nature of the nonsense results is unspecified. Currently, is*() will always return true (even if that leads to mutually contradictory conclusions, like isalpha and isdigit, or isgraph and isblank), and tolower/toupper() will always return EOF. But perhaps in the future the results may be randomized.
This way, if an application like firefox crashes on ctype abuse, you can opt to accept the consequences of nonsense results instead by running `env LIBC_ALLOWCTYPEABUSE= firefox' until the application is fixed.
PR lib/58208: ctype(3) provides poor runtime feedback of abuse
|
|
Revision tags: perseant-exfatfs-base-20250801 netbsd-11-base
|
| #
1.60 |
|
22-Apr-2025 |
nia |
branches: 1.60.2; Add basic tests for timespec_get(3), timespec_getres(3)
PR standards/58608
|
| #
1.59 |
|
30-Mar-2025 |
riastradh |
ctype(3): Disable guard page in static libc.
Adding the guard page may have overflown several small installation media. Let's try to keep this case small.
Update the tests to detect the cases where we will be running against a libc without a guard page on the LC_CTYPE=C tables, and skip testing abuse detection when it would rely on the guard page.
PR lib/58208: ctype(3) provides poor runtime feedback of abuse
|
| #
1.58 |
|
28-Mar-2025 |
riastradh |
t_ctype: New test for ctype(3) functions/macros.
PR lib/58208: ctype(3) provides poor runtime feedback of abuse
|
| #
1.57 |
|
13-Mar-2025 |
riastradh |
execve(2), posix_spawn(2): Add test case for an embarrassing bug.
PR kern/58091: after fork/execve or posix_spawn, parent kill(child, SIGTERM) has race condition making it unreliable
|
| #
1.56 |
|
27-Aug-2024 |
riastradh |
arc4random(3): Add automatic tests.
This verifies that: - arc4random zeroes its state and reseeds itself on fork - arc4random reseeds itself on entropy consolidation (e.g., VM clone) - arc4random falls back to global state if it can't allocate local state because address space limits cause mmap to fail
NOTE: This adds a new libc symbol __arc4random_global, but it's in the reserved namespace and only used by t_arc4random, so no libc minor bump.
PR kern/58632: getentropy(2) and arc4random(3) do not reseed on VM fork
|
|
Revision tags: perseant-exfatfs-base-20240630 perseant-exfatfs-base netbsd-10-0-RELEASE netbsd-10-0-RC6 netbsd-10-0-RC5 netbsd-10-0-RC4 netbsd-10-0-RC3 netbsd-10-0-RC2 netbsd-10-0-RC1 netbsd-10-base
|
| #
1.55 |
|
31-May-2022 |
riastradh |
branches: 1.55.2; 1.55.4; libc: Reintroduce getentropy.
This was introduced two years ago when the getrandom/getentropy API question was still open, and removed because the discussion was ongoing. Now getentropy is more widely adopted and soon to be in POSIX. So reintroduce the symbol into libc since we'll be keeping it anyway. Discussion of details of the semantics, as interpreted by NetBSD, is ongoing, but the symbol needs to get in before the netbsd-10 branch. The draft POSIX text is (https://www.opengroup.org/austin/docs/austin_1110.pdf):
SYNOPSIS #include <unistd.h>
int getentropy(void *buffer, size_t length);
DESCRIPTION The getentropy() function shall write length bytes of data starting at the location pointed to by buffer. The output shall be unpredictable high quality random data, generated by a cryptographically secure pseudo-random number generator. The maximum permitted value for the length argument is given by the {GETENTROPY_MAX} symbolic constant defined in <limits.h>.
RETURN VALUES Upon successful completion, getentropy() shall return 0; otherwise, -1 shall be retunred and errno set to indicate the error.
ERRORS The getentropy() function shall fail if:
[EINVAL] The value of length is greater than {GETENTROPY_MAX}.
The getentropy() function may fail if:
[ENOSYS] The system does not provide the necessary source of entropy.
RATIONALE The getentropy() function is not a cancellation point.
Minor changes from the previous introduction of getentropy into libc:
- Return EINVAL, not EIO, on buflen > 256. - Define GETENTROPY_MAX in limits.h.
The declaration of getentropy in unistd.h and definition of GETENTROPY_MAX in limits.h are currently conditional on _NETBSD_SOURCE. When the next revision of POSIX is finalized, we can expose them also under _POSIX_C_SOURCE > 20yymmL as usual -- and this can be done as a pullup without breaking existing compiled programs.
|
|
Revision tags: cjep_sun2x-base1 cjep_sun2x-base cjep_staticlib_x-base1 cjep_staticlib_x-base phil-wifi-20200421 phil-wifi-20200411 is-mlppp-base phil-wifi-20200406
|
| #
1.54 |
|
22-Feb-2020 |
kamil |
Update t_siginfo.c build rules
Add logic for MKSANITIZER/MKLIBCSANITIZER checks.
|
|
Revision tags: netbsd-9-4-RELEASE netbsd-9-3-RELEASE netbsd-9-2-RELEASE netbsd-9-1-RELEASE netbsd-9-0-RELEASE netbsd-9-0-RC2 netbsd-9-0-RC1 phil-wifi-20191119 netbsd-9-base phil-wifi-20190609
|
| #
1.53 |
|
26-Apr-2019 |
maya |
-frounding-math is gcc specific, help clang builds
|
| #
1.52 |
|
24-Apr-2019 |
christos |
PR/54000: Andreag Gustafsson: Compile the rounding test with -fround-math since with gcc-7, the default mode ignores fenv settings (the same effect can be achieved with -O0 :-)
https://gcc.gnu.org/wiki/FloatingPointMath
|
|
Revision tags: netbsd-8-3-RELEASE netbsd-8-2-RELEASE netbsd-8-1-RELEASE netbsd-8-1-RC1 pgoyette-compat-merge-20190127 pgoyette-compat-20190127 pgoyette-compat-20190118 pgoyette-compat-1226 pgoyette-compat-1126 pgoyette-compat-1020 pgoyette-compat-0930 pgoyette-compat-0906 pgoyette-compat-0728 netbsd-8-0-RELEASE phil-wifi-base pgoyette-compat-0625 netbsd-8-0-RC2 pgoyette-compat-0521 pgoyette-compat-0502 pgoyette-compat-0422 netbsd-8-0-RC1 pgoyette-compat-0415 pgoyette-compat-0407 pgoyette-compat-0330 pgoyette-compat-0322 pgoyette-compat-0315 pgoyette-compat-base matt-nb8-mediatek-base perseant-stdc-iso10646-base netbsd-8-base prg-localcount2-base3 prg-localcount2-base2 prg-localcount2-base1 prg-localcount2-base pgoyette-localcount-20170426 bouyer-socketcan-base1 pgoyette-localcount-20170320
|
| #
1.51 |
|
09-Feb-2017 |
christos |
branches: 1.51.12; remove exect, it will not be fixed and it will be removed.
|
|
Revision tags: bouyer-socketcan-base pgoyette-localcount-20170107
|
| #
1.50 |
|
09-Dec-2016 |
kamil |
branches: 1.50.2; Attach t_exect to ATF tests and distribution
Add missing SIGTRAP handler. Assert there that the signal is SIGTRAP as expected and si_code TRAP_TRACE.
This test will break on some ports that have dummy or incomplete implementation of exect(2).
This test works on amd64 correctly.
Sponsored by <The NetBSD Foundation>
|
|
Revision tags: pgoyette-localcount-20161104 localcount-20160914 pgoyette-localcount-20160806 pgoyette-localcount-20160726 pgoyette-localcount-base
|
| #
1.49 |
|
22-Dec-2015 |
christos |
branches: 1.49.2; Add __TEST_FENV
|
| #
1.48 |
|
22-Dec-2015 |
christos |
Put have fenv elsewhere.
|
| #
1.47 |
|
22-Dec-2015 |
martin |
Sync list of fenv enabled architectures again (PR 48633), this time for mips addition.
|
| #
1.46 |
|
21-Dec-2015 |
martin |
While PR 48633 is not properly fixed, keep the additional lists of fenv-enabled architectures in sync.
|
| #
1.45 |
|
08-Jul-2015 |
matt |
Build t_fpgetmask/t_fpgetround for aarch64 since they are now in libc
|
| #
1.44 |
|
27-Dec-2014 |
martin |
Enable fenv for arm
|
|
Revision tags: netbsd-7-2-RELEASE netbsd-7-1-2-RELEASE netbsd-7-1-1-RELEASE netbsd-7-1-RELEASE netbsd-7-1-RC2 netbsd-7-nhusb-base-20170116 netbsd-7-1-RC1 netbsd-7-0-2-RELEASE netbsd-7-nhusb-base netbsd-7-0-1-RELEASE netbsd-7-0-RELEASE netbsd-7-0-RC3 netbsd-7-0-RC2 netbsd-7-0-RC1 netbsd-7-base tls-maxphys-base
|
| #
1.43 |
|
10-Aug-2014 |
martin |
Do not set HAVE_FENV for arm as long as it misses feenableexcept().
|
| #
1.42 |
|
10-Aug-2014 |
martin |
Use the same condition for HAVE_FENV
|
| #
1.41 |
|
10-Aug-2014 |
matt |
Changes to existing files to enable building AARCH64 userland. evbarm64-el This is clang only. While gcc4.8 supports aarch64, no netbsd support has been written for aarch64 with gcc4.8.
|
|
Revision tags: yamt-pagecache-base9 tls-earlyentropy-base
|
| #
1.40 |
|
29-Apr-2014 |
uebayasi |
Minimal execve(2) ATF test.
|
|
Revision tags: riastradh-xf86-video-intel-2-7-1-pre-2-21-15 riastradh-drm2-base3
|
| #
1.39 |
|
30-Jan-2014 |
joerg |
branches: 1.39.2; Add test for uint64 to real long double conversion.
|
|
Revision tags: riastradh-drm2-base2 riastradh-drm2-base1 riastradh-drm2-base agc-symver-base yamt-pagecache-base8 yamt-pagecache-base7
|
| #
1.38 |
|
08-Nov-2012 |
pgoyette |
Convert old src/regress/timer&waiter tests to ATF
|
|
Revision tags: yamt-pagecache-base6 yamt-pagecache-base5 yamt-pagecache-base4
|
| #
1.37 |
|
13-Apr-2012 |
njoly |
branches: 1.37.2; Do not re-add -mieee option on alpha, it's already set by default.
|
| #
1.36 |
|
18-Mar-2012 |
jruoho |
Add a case for PR lib/41558. It is unclear whether this is a bug, but at least it is documented now. Probably it would be better to follow Linux, where the test case does not fail.
|
| #
1.35 |
|
17-Mar-2012 |
jruoho |
Add few basic tests for realpath(3).
|
|
Revision tags: netbsd-6-0-6-RELEASE netbsd-6-1-5-RELEASE netbsd-6-1-4-RELEASE netbsd-6-0-5-RELEASE netbsd-6-1-3-RELEASE netbsd-6-0-4-RELEASE netbsd-6-1-2-RELEASE netbsd-6-0-3-RELEASE netbsd-6-1-1-RELEASE netbsd-6-0-2-RELEASE netbsd-6-1-RELEASE netbsd-6-1-RC4 netbsd-6-1-RC3 netbsd-6-1-RC2 netbsd-6-1-RC1 netbsd-6-0-1-RELEASE matt-nb6-plus-nbase netbsd-6-0-RELEASE netbsd-6-0-RC2 matt-nb6-plus-base netbsd-6-0-RC1 netbsd-6-base
|
| #
1.34 |
|
13-Feb-2012 |
martin |
Move posix_spawn tests to lib/libc/gen/posix_spawn - they test both libc and kernel, but that is an implementation detail unrelated to the tests themselfs. Ok: releng
|
|
Revision tags: yamt-pagecache-base3
|
| #
1.33 |
|
08-Nov-2011 |
jruoho |
Few naive checks for cpuset(3) and ftok(3).
|
|
Revision tags: yamt-pagecache-base2
|
| #
1.32 |
|
05-Nov-2011 |
jruoho |
Few naive checks for time(3).
|
|
Revision tags: yamt-pagecache-base
|
| #
1.31 |
|
30-Sep-2011 |
christos |
branches: 1.31.2; Make the rounding test work properly, and actually test the rounding modes.
|
| #
1.30 |
|
19-Sep-2011 |
jruoho |
Move duplicate ldexp(3) test out from the tests/libc.
|
| #
1.29 |
|
19-Sep-2011 |
jruoho |
Move the tests/libc/ieeefp to tests/libc/gen to match the structure of libc. Also rename the test files to gain functional scope.
|
| #
1.28 |
|
07-Jul-2011 |
jruoho |
Move 't_glob_star' to 't_glob' for glob(3).
|
| #
1.27 |
|
07-Jul-2011 |
jruoho |
Move 't_syslog_pthread' to 't_syslog' for consistency with libc.
|
| #
1.26 |
|
14-Jun-2011 |
jruoho |
Test that assert(3) works.
|
| #
1.25 |
|
03-Jun-2011 |
jruoho |
Test also setdomainname(3).
|
| #
1.24 |
|
02-Jun-2011 |
jruoho |
Few naive tests for sethostname(3).
|
|
Revision tags: cherry-xenmp-base
|
| #
1.23 |
|
10-May-2011 |
jruoho |
branches: 1.23.2; Few naive tests for pause(3).
|
| #
1.22 |
|
09-May-2011 |
jruoho |
Few basic tests for closefrom(3).
|
| #
1.21 |
|
05-May-2011 |
jruoho |
Try to mirror the real source with the test directory structure (otherwise the latter carries a risk of becoming a difficult mess to manage.)
|
| #
1.20 |
|
05-May-2011 |
jruoho |
Few fundamental consistency checks for alarm(2).
|
| #
1.19 |
|
17-Apr-2011 |
jruoho |
Test nice(3) also with threads.
|
| #
1.18 |
|
10-Apr-2011 |
jruoho |
A naive test case for getcwd(3).
|
| #
1.17 |
|
05-Apr-2011 |
jruoho |
Add simple test cases for ttyname(3), strtod(3), and getgrent(3).
|
| #
1.16 |
|
04-Apr-2011 |
jruoho |
Few simple tests for nice(3).
|
| #
1.15 |
|
24-Mar-2011 |
jruoho |
Sort.
|
| #
1.14 |
|
24-Mar-2011 |
jruoho |
Add a naive test case for raise(3).
|
|
Revision tags: bouyer-quota2-nbase bouyer-quota2-base
|
| #
1.13 |
|
13-Jan-2011 |
pgoyette |
Continuing the (re)organization of the lib/libc atf regression tests
|
| #
1.12 |
|
02-Jan-2011 |
pgoyette |
One more reference to HAVE_SIGINFO bites the dust
|
|
Revision tags: matt-mips64-premerge-20101231
|
| #
1.11 |
|
01-Jan-2011 |
pgoyette |
Build t_ldexp test always. The test itself determines if it is running on an unsupported platform (vax) and exits.
|
| #
1.10 |
|
28-Dec-2010 |
pgoyette |
Fix name of t_ldexp test from previous
|
| #
1.9 |
|
28-Dec-2010 |
pgoyette |
Don't build ldexp tests on vax
|
| #
1.8 |
|
28-Dec-2010 |
pgoyette |
Migrate the ldexp test to atf
|
| #
1.7 |
|
28-Dec-2010 |
pgoyette |
Migrate the remaining libc/gen tests to atf
|
| #
1.6 |
|
25-Dec-2010 |
pgoyette |
Correctly added the conditional part, but now need to remove the original unconditional part.
|
| #
1.5 |
|
25-Dec-2010 |
pgoyette |
Don't include the siginfo tests unless we actually have siginfo ability!
|
| #
1.4 |
|
25-Dec-2010 |
pgoyette |
Move the siginfo tests from regress to atf. While here, add a new test for PR/43655.
XXX The sigchild_dump test currently fails when execute under atf-run. XXX It does not fail when executed directly from the shell, so there's XXX something in atf that prevents the child process from dumping.
|
| #
1.3 |
|
22-Dec-2010 |
pgoyette |
Migrate a couple more tests from the old regress structure to atf
|
| #
1.2 |
|
17-Dec-2010 |
pooka |
Add an isolated test case for PR lib/44248.
|
| #
1.1 |
|
06-Sep-2010 |
christos |
Add tests for GLOB_STAR
|