summaryrefslogtreecommitdiffstats
path: root/tools/regression/lib
Commit message (Collapse)AuthorAgeFilesLines
...
* Add <uchar.h>.ed2013-05-213-1/+268
| | | | | | | | | | | | The <uchar.h> header, part of C11, adds a small number of utility functions for 16/32-bit "universal" characters, which may or may not be UTF-16/32. As our wchar_t is already ISO 10646, simply add light-weight wrappers around wcrtomb() and mbrtowc(). While there, also add (non-yet-standard) _l functions, similar to the ones we already have for the other locale-dependent functions. Reviewed by: theraven
* popen(): Add 'e' mode character to set close-on-exec on the new fd.jilles2013-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+".
* Add a test program for popen().jilles2013-05-202-1/+228
|
* wordexp(): Remove wrong IFS usage.jilles2013-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.
* Add an implementation of open_memstream() and open_wmemstream(). Thesejhb2013-02-275-1/+429
| | | | | | | | | routines provide write-only stdio FILE objects that store their data in a dynamically allocated buffer. They are a string builder interface somewhat akin to a completely dynamic sbuf. Reviewed by: bde, jilles (earlier versions) MFC after: 1 month
* - Fix more style(9)-related issues (copyright header, spaces after functiongahr2013-02-011-71/+71
| | | | | | | | | names, unnecessary casts) - Change type of boolean variable from char to bool Suggested by: jhb, zont, jmallett Reviewed by: cognet Approved by: cognet
* - Remove underscores from the internal structure name, as it doesn't collidegahr2013-01-311-27/+136
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | with the user's namespace. - Correct size and position variables type from long to size_t. - Do not set errno to ENOMEM on malloc failure, as malloc already does so. - Implement the concept of "buffer data length", which mandates what SEEK_END refers to and the allowed extent for a read. - Use NULL as read-callback if the buffer is opened in write-only mode. Conversely, use NULL as write-callback when opened in read-only mode. - Implement the handling of the ``b'' character in the mode argument. A binary buffer differs from a text buffer (default mode if ``b'' is omitted) in that NULL bytes are never appended to writes and that the "buffer data length" equals to the size of the buffer. - Remove shall from the man page. Use indicative instead. Also, specify that the ``b'' flag does not conform with POSIX but is supported by glibc. - Update the regression test so that the ``b'' functionality and the "buffer data length" concepts are tested. - Minor style(9) corrections. Suggested by: jilles Reviewed by: cognet Approved by: cognet
* Add fmemopen(3), an interface to get a FILE * from a buffer in memory, alonggahr2013-01-302-0/+153
| | | | | | | | with the respective regression test. See http://pubs.opengroup.org/onlinepubs/9699919799/functions/fmemopen.html Reviewed by: cognet Approved by: cognet
* libc: Add a missing header to a test program.jilles2012-12-081-0/+1
| | | | Usage of dup(), mkstemp() and unlink() needs <unistd.h>.
* Non-void function should return a value.emaste2012-11-201-1/+1
| | | | Found by: clang
* remove duplicate semicolons where possible.eadler2012-10-221-1/+1
| | | | | Approved by: cperciva MFC after: 1 week
* nftw(): POSIX says directories causing loops should be silently skipped.jilles2012-08-092-1/+142
| | | | Formerly, loops caused nftw() to abort the traversal with ELOOP.
* Add some tests from PR 166463. Also make sure that all of the tests,das2012-04-071-7/+33
| | | | | old and new, check the sign bits of both the remainder and the quotient.
* libc: Add some tests for fmtmsg().jilles2012-02-212-1/+252
|
* Add .t files for tests, missed in prior checkins, so that prove(1) worksdas2012-01-143-0/+30
| | | | in this directory.
* Update the tests for arm and other ports where long double is the samedas2012-01-141-3/+3
| | | | as double, similar to r178141.
* Fix a test that doesn't work on architectures where long double is nodas2012-01-141-0/+2
| | | | wider than double. Thanks to Ian Lepore for catching the bug.
* Spelling fixes for tools/uqs2011-12-301-1/+1
| | | | Add some $FreeBSD$ tags so svn will allow the commit.
* A regression test to ensure that arc4random returns different sequencesdas2011-11-152-1/+91
| | | | in parent and child processes after a fork.
* Add regression tests for modf{,f,l}().das2011-10-211-26/+108
|
* Tests for complex trig and hyperbolic functions.das2011-10-213-1/+552
|
* Tests for cancellation in fma(). Also include more tests for 128-bitdas2011-10-211-3/+63
| | | | | long doubles. Thanks for clusteradm (simon) for making the needed hardware available.
* Add some tests for corner cases of log() in unusual rounding modes.das2011-10-151-2/+29
| | | | I wrote these ages ago, but they've been failing until now.
* Add some tests for double-rounding bugs in fma().das2011-10-151-1/+54
|
* posix_spawn: If an error is detected in the child process, reap the zombie.jilles2011-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
* Allow strerror(0) and strerror_r(0, ...).jilles2011-04-051-8/+13
| | | | | | | | | | | | | Of course, strerror_r() may still fail with ERANGE. Although the POSIX specification said this could fail with EINVAL and doing this likely indicates invalid use of errno, most other implementations permitted it, various POSIX testsuites require it to work (matching the older sys_errlist array) and apparently some applications depend on it. PR: standards/151316 MFC after: 1 week
* Add some tests for cexp() and cexpf(). (I need to clean up all ofdas2011-03-073-1/+391
| | | | | these tests some day, but in the mean time, they're a useful sanity check for future changes.)
* Work around gcc constant folding bugs.das2010-12-061-1/+6
|
* signbit() returns nonzero for negative arguments, but we shouldn't assumedas2010-12-066-6/+8
| | | | that it always returns the same nonzero value.
* Fix some warnings.das2010-12-051-3/+3
|
* Add regression tests for logarithmic functions in the math library.das2010-12-053-1/+169
|
* Add some basic regression tests for nearbyint().das2010-12-033-1/+111
|
* Generate some tests for sh's case command from the fnmatch tests.jilles2010-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.
* fnmatch: Fix bad FNM_PERIOD disabling if an asterisk has been seen.jilles2010-04-161-0/+1
| | | | | | | Example: fnmatch("a*b/*", "abbb/.x", FNM_PATHNAME | FNM_PERIOD) PR: 116074 MFC after: 1 week
* Add some tests for fnmatch(3).jilles2010-04-162-1/+336
| | | | MFC after: 1 week
* The NetBSD Foundation has granted permission to remove clause 3 and 4 fromjoel2010-03-031-7/+0
| | | | | | their software. Obtained from: NetBSD
* Add test-pidfile.c and increase warning level.des2009-11-121-2/+2
|
* Test cases for pidfile(3) - including two designed to catch issues arisingdes2009-11-121-0/+280
| | | | from the incorrect use of fcntl(2) instead of flock(2).
* Fix warnings and remove one unnecessary use of vfork(). The other coulddes2009-11-121-9/+3
| | | | also be removed with a little more work.
* Fix warningsdes2009-11-123-7/+9
|
* Check fork() return valuedes2009-11-101-2/+5
|
* wordexp(3): fix some bugs with signals and long outputsjilles2009-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
* Update copyright.des2009-10-191-1/+1
|
* Remove redundant $FreeBSD$.des2009-10-191-2/+0
|
* Regression tests for r197752 (handling of empty/NULL buffers).das2009-10-041-1/+20
|
* Check that flopen() can lock against self and that children inherit the lock.des2009-06-061-6/+41
|
* Return -1 instead of 0 upon reaching EOF. This is somewhat ill-adviseddas2009-04-061-2/+2
| | | | | | | | because it means getdelim() returns -1 for both error and EOF, and never returns 0. However, this is what the original GNU implementation does, and POSIX inherited the bug. Reported by: marcus@
* Tests for getdelim().das2009-02-282-1/+169
|
* Add a file containing tests for simple format specifiers.das2009-02-282-1/+157
| | | | | Currently it only has tests for a few sign issues with integer formats, including PR 131880.
* Tests for wcscasecmp(), wcsnlen(), and stpncpy().das2009-02-284-1/+269
|
OpenPOWER on IntegriCloud