aboutsummaryrefslogtreecommitdiff
path: root/tools/regression/lib/libc/gen
Commit message (Collapse)AuthorAgeFilesLines
* Integrate tools/regression/lib/libc/gen into the FreeBSD test suiteEnji Cooper2015-11-098-1490/+0
| | | | | | | | | | | | | | | | | | | | | | as lib/libc/tests/gen The code in test-fnmatch that was used for generating: - bin/sh/tests/builtins/case2.0 - bin/sh/tests/builtins/case3.0 has been left undisturbed. The target `make sh-tests` has been moved over from tools/regression/lib/libc/gen/Makefile to lib/libc/tests/gen/Makefile and made into a PHONY target case2.0 and case3.0 test input generation isn't being done automatically. This needs additional discussion. MFC after: 1 week Sponsored by: EMC / Isilon Storage Division Notes: svn path=/head/; revision=290572
* wordexp(): Improve some error codes.Jilles Tjoelker2015-08-191-0/+9
| | | | | | | | | | Distinguish between WRDE_BADVAL and WRDE_SYNTAX based on when the error occurred (parsing or execution), not based on whether WRDE_UNDEF was passed. Also, return WRDE_NOSPACE for a few more unexpected results from sh. Notes: svn path=/head/; revision=286941
* wordexp(): Add testcase for non-default IFS in environment.Jilles Tjoelker2015-03-291-0/+15
| | | | | | | | | The non-default IFS is expected to be used. MFC after: 1 week Notes: svn path=/head/; revision=280830
* Convert tools/regression/lib/libc/stdio/test-fpclassify into an ATF testcase andEnji Cooper2014-11-162-77/+1
| | | | | | | | | Rename as lib/libc/stdio/fpclassify2_test Sponsored by: EMC / Isilon Storage Division Notes: svn path=/head/; revision=274595
* Remove test-arc4random from this Makefile so others can continue to useEnji Cooper2014-11-161-1/+1
| | | | | | | this as-is for the time being Notes: svn path=/head/; revision=274582
* Convert tools/regression/lib/libc/gen/test-arc4random into an ATF testcase andEnji Cooper2014-11-161-89/+0
| | | | | | | | | rename as lib/libc/gen/arc4random_test Sponsored by: EMC / Isilon Storage Division Notes: svn path=/head/; revision=274581
* fnmatch(): Add test for r254091 (pattern with single backslash).Jilles Tjoelker2013-08-111-0/+4
| | | | | | | | | | | This test cannot be converted to an sh(1) test because the syntax would be invalid. PR: 181129 MFC after: 1 week Notes: svn path=/head/; revision=254231
* wordexp(): Fix syntax validation for backslashes in single-quotes.Jilles Tjoelker2013-07-231-0/+12
| | | | Notes: svn path=/head/; revision=253581
* Add missing headers.Kevin Lo2013-07-172-0/+3
| | | | Notes: svn path=/head/; revision=253403
* popen(): Add 'e' mode character to set close-on-exec on the new fd.Jilles Tjoelker2013-05-201-4/+4
| | | | | | | | | | | | | | | | | If 'e' is used, the kernel must support the recently added pipe2() system call. The use of pipe2() with O_CLOEXEC also fixes race conditions between concurrent popen() calls from different threads, even if the close-on-exec flag on the fd of the returned FILE is later cleared (because popen() closes all file descriptors from earlier popen() calls in the child process). Therefore, this approach should be used in all cases when pipe2() can be assumed present. The old version of popen() rejects "re" and "we" but treats "r+e" like "r+". Notes: svn path=/head/; revision=250827
* Add a test program for popen().Jilles Tjoelker2013-05-202-1/+228
| | | | Notes: svn path=/head/; revision=250825
* wordexp(): Remove wrong IFS usage.Jilles Tjoelker2013-04-011-0/+19
| | | | | | | | | | | | | | Words in shell script are separated by spaces or tabs independent of the value of IFS. The value of IFS is only relevant for the result of substitutions. Therefore, there should be a space between 'wordexp' and the words to be expanded, not an IFS character. Paranoia might dictate that the shell ignore IFS from the environment (even though our sh currently uses it), so do not depend on it in the new test case. Notes: svn path=/head/; revision=248987
* nftw(): POSIX says directories causing loops should be silently skipped.Jilles Tjoelker2012-08-092-1/+142
| | | | | | | Formerly, loops caused nftw() to abort the traversal with ELOOP. Notes: svn path=/head/; revision=239160
* libc: Add some tests for fmtmsg().Jilles Tjoelker2012-02-212-1/+252
| | | | Notes: svn path=/head/; revision=231984
* A regression test to ensure that arc4random returns different sequencesDavid Schultz2011-11-152-1/+91
| | | | | | | in parent and child processes after a fork. Notes: svn path=/head/; revision=227522
* posix_spawn: If an error is detected in the child process, reap the zombie.Jilles Tjoelker2011-07-102-1/+91
| | | | | | | | | | | | | Formerly, in this case an error was returned but the pid was also returned to the application, requiring the application to use unspecified behaviour (the returned pid in error situations) to avoid zombies. Now, reap the zombie and do not return the pid. MFC after: 2 weeks Notes: svn path=/head/; revision=223907
* Generate some tests for sh's case command from the fnmatch tests.Jilles Tjoelker2010-05-092-1/+55
| | | | | | | | I'm committing the generated files because I don't like a build dependency for the sh(1) tests, and they are small and will not change much. Notes: svn path=/head/; revision=207821
* fnmatch: Fix bad FNM_PERIOD disabling if an asterisk has been seen.Jilles Tjoelker2010-04-161-0/+1
| | | | | | | | | | Example: fnmatch("a*b/*", "abbb/.x", FNM_PATHNAME | FNM_PERIOD) PR: 116074 MFC after: 1 week Notes: svn path=/head/; revision=206711
* Add some tests for fnmatch(3).Jilles Tjoelker2010-04-162-1/+336
| | | | | | | MFC after: 1 week Notes: svn path=/head/; revision=206710
* wordexp(3): fix some bugs with signals and long outputsJilles Tjoelker2009-10-231-0/+42
| | | | | | | | | | | | | | | * retry various system calls on EINTR * retry the rest after a short read (common if there is more than about 1K of output) * block SIGCHLD like system(3) does (note that this does not and cannot work fully in threaded programs, they will need to be careful with wait functions) PR: 90580 MFC after: 1 month Notes: svn path=/head/; revision=198406
* Regression tests for fmtcheck(3).David Schultz2008-08-022-1/+103
| | | | | | | Obtained from: NetBSD Notes: svn path=/head/; revision=181155
* Fix an amusing typo that has prevented this from compiling since 2004.David Schultz2007-12-161-7/+7
| | | | Notes: svn path=/head/; revision=174692
* Write negative zero as '-0.0'. Otherwise, it is parsed as an integerDavid Schultz2003-03-271-2/+2
| | | | | | | before being cast to a floating point type, and the sign is lost. Notes: svn path=/head/; revision=112698
* Add more tests. Specifically, infinity cast from other types shouldMike Barcroft2003-02-081-0/+6
| | | | | | | always be classified as infinity. Notes: svn path=/head/; revision=110569
* Add regression test for soon-to-be-committed fpclassify().Mike Barcroft2003-02-052-1/+70
| | | | Notes: svn path=/head/; revision=110405
* Add a regression test for wordexp() and wordfree().Tim J. Robbins2003-01-042-0/+185
Notes: svn path=/head/; revision=108639