summaryrefslogtreecommitdiffstats
path: root/regress/lib/libc
AgeCommit message (Collapse)AuthorFilesLines
2021-04-02Two cases of BRE involving counts and backrefs that go wrong andotto1-1/+16
similar that have no isssues. Reported by Michael Paoli. Failing cases commented out for now.
2021-03-27Handle dynamic definition of SIGSTKSZ as of glibc 2.34 on Linux.bcook1-7/+24
ok bluhm@, inoguchi@, tb@, deraadt@
2021-02-12A few more flag combo's to testotto1-2/+14
2020-12-31Remove unused categories in re_guts; they are written to but never read.millert1-39/+2
From miod@, OK tb@
2020-12-28Fix an off-by-one error in the marking of the O_CH operator followingmillert1-1/+4
an OOR2 operator. Also includes a regress test for the issue. From FreeBSD via miod@
2020-12-17Remove echo headlines.bluhm2-5/+2
2020-12-06Enable t_mmap-1 test. It is skipped on NetBSD, but works for us.bluhm2-3/+10
2020-11-11Run the atf cleanup block after each test. This makes more testsbluhm1-9/+11
pass when run as non root.
2020-11-10Declare prototype of __syscall locally. Fixes t_syscall test.bluhm2-3/+7
2020-11-09Sync libc syscall tests with changes in upstream NetBSD. Use #ifdefbluhm20-283/+212
to document differences to NetBSD behaviour, this helps to track upstream. Mark currently failing test as expected failures. So test programs get compiled and executed, but it shows that further investigation is necceassry.
2020-10-21On machines with a userland timecounter we bypass the gettimeofday(2)kettenis1-2/+16
syscall. So whenever we pass a bad address we get a SIGSEGV instead of EFAULT. POSIX explicitly allows this behaviour. So adjust the test to deal with this case. ok deraadt@, millert@, guenther@
2020-10-19Skip floating-point exception checks on arm64 and armv7 as the hardwarekettenis2-2/+6
(typically) doesn't implement support for these. ok patrick@, drahn@
2020-10-18XFAIL tests on arm64 and armv7 as floating-point exception support iskettenis1-1/+6
optional and isn't implemented on most hardware.
2020-10-06Use std=gnu99 to be able to build the tests with both base clang and gcc.mpi1-1/+3
2020-08-17Fix append mode so it always writes to the end and expand regress.millert1-26/+77
OK deraadt@ martijn@
2020-07-14getopt(3) returns an int so don't use a char to store its return value.kettenis2-4/+4
Makes the test work on architectures where char is unsigned. ok deraadt@, millert@
2020-07-09New regression tests for integral type conversionsschwarze2-2/+378
and for their modifiers, written from scratch.
2020-07-08New regression tests for character and string conversionsschwarze2-2/+445
and for their modifiers, written from scratch.
2020-07-06Add support for timeconting in userland.pirofti4-0/+140
This diff exposes parts of clock_gettime(2) and gettimeofday(2) to userland via libc eliberating processes from the need for a context switch everytime they want to count the passage of time. If a timecounter clock can be exposed to userland than it needs to set its tc_user member to a non-zero value. Tested with one or multiple counters per architecture. The timing data is shared through a pointer found in the new ELF auxiliary vector AUX_openbsd_timekeep containing timehands information that is frequently updated by the kernel. Timing differences between the last kernel update and the current time are adjusted in userland by the tc_get_timecount() function inside the MD usertc.c file. This permits a much more responsive environment, quite visible in browsers, office programs and gaming (apparently one is are able to fly in Minecraft now). Tested by robert@, sthen@, naddy@, kmos@, phessler@, and many others! OK from at least kettenis@, cheloha@, naddy@, sthen@
2020-06-26Provide an optimized implementation of ffs(3) in libc onnaddy3-2/+26
aarch64/powerpc/powerpc64, making use of the count leading zeros instruction. Also add a brief regression test. ok deraadt@ kettenis@
2020-05-31Fix printing long doubles on architectures with hm and lm bits.mortimer1-1/+9
Issue reported with initial patch by enh@google.com. ok deraadt@
2020-05-27more tests after getopt_long.c rev. 1.32;schwarze1-10/+43
OK martijn@
2020-03-23Add a test program for getopt(3) that is adequate for manual testingschwarze4-2/+174
and a compact test suite for getopt(3) intended automated regression testing, both written from scratch. The suite is intended to provide full coverage, except that it doesn't test manual changes of optind and optreset and except that it so far avoids the situation where we have a known bug.
2020-03-09cstyle in illumos noticed some weird syntax, which this fixes.dlg1-4/+4
some errx lines in if statements were terminated with commas, which caused the following statement to be considered part of the error handling. while it is bad style, ingo points out it was also a bug which which caused some tests in the code to be skipped. this reminds me of a haiku that Chris Pascoe (cpascoe@) had behind his desk: Also, that comma Should be a semi-colon. Cherry blossoms fall. this was found by Robert Mustacchi when porting the tests to illumos. ok schwarze@ stsp@ thank you robert.
2020-02-14no need to declare "extern optarg" and "extern optind"schwarze3-9/+3
when <unistd.h> is included; patch from Jan Stary <hans at stare dot cz>; OK millert
2020-02-02Add missing new line to printf. Make clean should not require SUDO.bluhm2-7/+5
2020-01-30Enable t_ptrace with an errno change compared to NetBSD.mpi4-19/+31
Note that the last test triggers a kernel bug related to waitpid(9) and ptraced processes. This is now visible thanks to recent make(1) changes. guenther@ suggests to look at the logic behind `p_orphan' in FreeBSD to fix this bug.
2020-01-16Check fpu functions without setjmp/longjmp before testing the latter.bluhm2-10/+62
Use exit code 2 for setup failure and 1 for test fail. Unfortunately this regress is still failing.
2020-01-16Check fpu functions without setjmp/longjmp before testing the latter.bluhm1-3/+9
Use exit code 2 for setup failure and 1 for test fail. Unfortunately this regress is still failing.
2020-01-13Make clean should not require SUDO.bluhm1-3/+1
2020-01-13Fix printf compiler warnings in wfp regress. Convert wchar to abluhm1-9/+18
printable error message when failing.
2020-01-13Link forgotten libc tests to the build.bluhm2-6/+10
2020-01-13Split setjmp-fpu regress into separate tests. Use errx(3) to explainbluhm6-32/+69
potential problems. Regress still failing on amd64.
2019-11-22Sync tests with current NetBSD. Enable t_mkfifo test.bluhm6-27/+44
from Moritz Buhl
2019-11-19Link system call tests to build.bluhm1-1/+2
2019-11-19Import NetBSD system call regression tests. They were written withbluhm49-0/+10692
ATF (Automated Testing Framework), so we use a small wrapper to map it to our bsd.regress.mk framework. Only half of the 80 NetBSD tests have been taken, the others need more work to adapt. Of them 34 syscall tests pass. Moritz Buhl ported the tests to OpenBSD.
2019-06-12Set malloc_options in global scope with an initializer.bluhm2-10/+8
recommended by otto@
2019-06-11Disable junking with malloc options. If set, the test hangs on lowbluhm1-2/+5
memory arm64 machines. found by patrick@; OK otto@
2019-06-04Move to env var, likelky the possibility to set malloc options fromotto2-19/+8
main is going away.
2019-05-23Throw malloc_conceal and freezero into the mix.otto1-3/+8
2019-05-13The call to fseek(fp, -1, SEEK_END) also sets the reported size tobluhm1-10/+10
this value. To match the expectation of the test again, move this line before the the code that sets the final position. OK yasuoka@
2019-05-02Add test fseek(,-1) works properly.yasuoka1-3/+8
2019-01-25I am retiring my old email address; replace it with my OpenBSD one.millert9-16/+16
2018-12-16Add regress test for bugs in stdio/fread.c rev 1.13 and 1.17millert3-2/+160
2018-12-15add a -R option to set/unset resolver flags.eric9-20/+101
use strcasecmp for reading args.
2018-11-29This test does not terminate if malloc conf is preconfigured withbluhm1-2/+6
J. Clear that option to allow running full regress with paranoid malloc flags. This is the same fix as for malloc_ulimit1.
2018-11-29We're manipulating malloc flags ourselves, start with restting them all.otto1-1/+5
ok bluhm@
2018-11-28This test does not terminate if malloc conf is preconfigured withbluhm1-4/+8
J. Clear that option to allow running full regress with paranoid malloc flags. Also fix whitespace. OK otto@
2018-03-29Fix three bugs in setlocale(3):schwarze1-2/+2
1. setlocale(LC_ALL, "A"); setlocale(LC_CTYPE, "T"); setlocale(LC_ALL, NULL); must return "A/T/A/A/A/A", not "A". Fix this by always initializing the LC_ALL entry of newgl to "" in dupgl(). Reported by Karl Williamson <public at khwilliamson dot com> on bugs@, thanks! 2. Do not leak newgl when strdup(3) fails in setlocale(3). 3. For setlocale(LC_ALL, "C/C/fr_FR.UTF-8/C/C/C"); correctly set _GlobalRuneLocale; i found 2. and 3. while looking at the code. Feedback on a buggy earlier version and OK martijn@.
2018-01-28typootto1-2/+2