summaryrefslogtreecommitdiff
path: root/tools/regression/lib
Commit message (Collapse)AuthorAgeFilesLines
...
* Regression tests for the libnv library.Pawel Jakub Dawidek2013-11-127-0/+1441
| | | | | | | Sponsored by: The FreeBSD Foundation Notes: svn path=/head/; revision=258070
* don't assert on bad args, instead return an error..John-Mark Gurney2013-10-073-1/+604
| | | | | | | | | | | | | | | | | | Since so many programs don't check return value, always NUL terminate the buf... fix rounding when using base 1024 (the bug that started it all)... add a set of test cases so we can make sure that things don't break in the future... Thanks to Clifton Royston for testing and the test program... Approved by: re (hrs, glebius) MFC after: 1 week Notes: svn path=/head/; revision=256130
* libc/stdio: Allow fopen/freopen modes in any order (except initial r/w/a).Jilles Tjoelker2013-09-062-0/+123
| | | | | | | | | | | | | Austin Group issue #411 requires 'e' to be accepted before and after 'x', and encourages accepting the characters in any order, except the initial 'r', 'w' or 'a'. Given that glibc accepts the characters after r/w/a in any order and that diagnosing this problem may be hard, change our libc to behave that way as well. Notes: svn path=/head/; revision=255303
* libc/stdio: Run mkostemp test using prove.Jilles Tjoelker2013-09-061-0/+10
| | | | Notes: svn path=/head/; revision=255302
* libc/stdio: Provide proper TAP output for fmemopen/open_[w]memstream.Jilles Tjoelker2013-09-063-3/+18
| | | | | | | | A *.t file should provide Test Anything Protocol output so that it can be run using the Perl "prove" tool. Notes: svn path=/head/; revision=255301
* 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
* Add mkostemp() and mkostemps().Jilles Tjoelker2013-08-092-3/+167
| | | | | | | | These are like mkstemp() and mkstemps() but allow passing open(2) flags like O_CLOEXEC. Notes: svn path=/head/; revision=254151
* 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
* Restore "all rights reserved" (spelled correctly). This was actually part ↵Eitan Adler2013-06-178-0/+8
| | | | | | | | | of the standard text of the license which I did not realize prior. Approved by: bushman Notes: svn path=/head/; revision=251867
* Remove lines declaring "All rights reserved" or similar comments: theyEitan Adler2013-06-169-9/+0
| | | | | | | | | are not true as the files are actually under the BSD-2 license Approved by: bushman Notes: svn path=/head/; revision=251818
* Fix some bugs in the complex trig tests so that they test both doubleDavid Schultz2013-06-101-33/+68
| | | | | | | and float precision properly. Notes: svn path=/head/; revision=251598
* Add libiconv based versions of *c16*() and *c32*().Ed Schouten2013-06-032-0/+75
| | | | | | | | | | | | | | | | I initially thought wchar_t was locale independent, but this seems to be only the case on Linux. This means that we cannot depend on the *wc*() routines to implement *c16*() and *c32*(). Instead, use the Citrus libiconv that is part of libc. I'll see if there is anything I can do to make the existing functions somewhat useful in case the system is built without libiconv in the nearby future. If not, I'll simply remove the broken implementations. Reviewed by: jilles, gabor Notes: svn path=/head/; revision=251314
* Add more tests for log functions. A few are commented out because theDavid Schultz2013-06-031-1/+114
| | | | | | | | | long double versions don't pass yet. (They are rather nit-picky cases, so there's ongoing discussion with Bruce about whether it is worth the performance cost.) Notes: svn path=/head/; revision=251293
* Factor out some common code from the libm tests. This is a bit messyDavid Schultz2013-06-0215-628/+412
| | | | | | | | | | | because different tests have different ideas about what it means to be "close enough" to the right answer, depending on the properties of the function being tested. In the process, I fixed some warnings and added a few more 'volatile' hacks, which are sufficient to make all the tests pass at -O2 with clang. Notes: svn path=/head/; revision=251241
* Fix some harmless bugs in a test.David Schultz2013-05-301-2/+2
| | | | Notes: svn path=/head/; revision=251120
* Basic tests for complex inverse trig and hyperbolic functions.David Schultz2013-05-302-1/+444
| | | | Notes: svn path=/head/; revision=251119
* Fix cexp regression tests that have an infinite real part. The signs of theTijl Coosemans2013-05-281-12/+26
| | | | | | | | | | | result depend on the cosine and sine of the imaginary part. Small values are used in the new tests such that cosine and sine are well defined. Reviewed by: das Notes: svn path=/head/; revision=251053
* Fix some regressions caused by the switch from gcc to clang. The fixesDavid Schultz2013-05-271-19/+25
| | | | | | | | | | | | | are workarounds for various symptoms of the problem described in clang bugs 3929, 8100, 8241, 10409, and 12958. The regression tests did their job: they failed, someone brought it up on the mailing lists, and then the issue got ignored for 6 months. Oops. There may still be some regressions for functions we don't have test coverage for yet. Notes: svn path=/head/; revision=251024
* Add missing #includes, to keep Clang silent.Ed Schouten2013-05-253-0/+3
| | | | Notes: svn path=/head/; revision=250989
* Add <uchar.h>.Ed Schouten2013-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 Notes: svn path=/head/; revision=250883
* 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
* Add an implementation of open_memstream() and open_wmemstream(). TheseJohn Baldwin2013-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 Notes: svn path=/head/; revision=247411
* - Fix more style(9)-related issues (copyright header, spaces after functionPietro Cerutti2013-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 Notes: svn path=/head/; revision=246206
* - Remove underscores from the internal structure name, as it doesn't collidePietro Cerutti2013-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 Notes: svn path=/head/; revision=246148
* Add fmemopen(3), an interface to get a FILE * from a buffer in memory, alongPietro Cerutti2013-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 Notes: svn path=/head/; revision=246120
* libc: Add a missing header to a test program.Jilles Tjoelker2012-12-081-0/+1
| | | | | | | Usage of dup(), mkstemp() and unlink() needs <unistd.h>. Notes: svn path=/head/; revision=244038
* Non-void function should return a value.Ed Maste2012-11-201-1/+1
| | | | | | | Found by: clang Notes: svn path=/head/; revision=243346
* remove duplicate semicolons where possible.Eitan Adler2012-10-221-1/+1
| | | | | | | | Approved by: cperciva MFC after: 1 week Notes: svn path=/head/; revision=241844
* 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
* Add some tests from PR 166463. Also make sure that all of the tests,David Schultz2012-04-071-7/+33
| | | | | | | | old and new, check the sign bits of both the remainder and the quotient. Notes: svn path=/head/; revision=233974
* libc: Add some tests for fmtmsg().Jilles Tjoelker2012-02-212-1/+252
| | | | Notes: svn path=/head/; revision=231984
* Add .t files for tests, missed in prior checkins, so that prove(1) worksDavid Schultz2012-01-143-0/+30
| | | | | | | in this directory. Notes: svn path=/head/; revision=230115
* Update the tests for arm and other ports where long double is the sameDavid Schultz2012-01-141-3/+3
| | | | | | | as double, similar to r178141. Notes: svn path=/head/; revision=230114
* Fix a test that doesn't work on architectures where long double is noDavid Schultz2012-01-141-0/+2
| | | | | | | wider than double. Thanks to Ian Lepore for catching the bug. Notes: svn path=/head/; revision=230102
* Spelling fixes for tools/Ulrich Spörlein2011-12-301-1/+1
| | | | | | | Add some $FreeBSD$ tags so svn will allow the commit. Notes: svn path=/head/; revision=228975
* 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
* Add regression tests for modf{,f,l}().David Schultz2011-10-211-26/+108
| | | | Notes: svn path=/head/; revision=226605
* Tests for complex trig and hyperbolic functions.David Schultz2011-10-213-1/+552
| | | | Notes: svn path=/head/; revision=226603
* Tests for cancellation in fma(). Also include more tests for 128-bitDavid Schultz2011-10-211-3/+63
| | | | | | | | long doubles. Thanks for clusteradm (simon) for making the needed hardware available. Notes: svn path=/head/; revision=226602
* Add some tests for corner cases of log() in unusual rounding modes.David Schultz2011-10-151-2/+29
| | | | | | | I wrote these ages ago, but they've been failing until now. Notes: svn path=/head/; revision=226378
* Add some tests for double-rounding bugs in fma().David Schultz2011-10-151-1/+54
| | | | Notes: svn path=/head/; revision=226377
* 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
* Allow strerror(0) and strerror_r(0, ...).Jilles Tjoelker2011-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 Notes: svn path=/head/; revision=220376
* Add some tests for cexp() and cexpf(). (I need to clean up all ofDavid Schultz2011-03-073-1/+391
| | | | | | | | these tests some day, but in the mean time, they're a useful sanity check for future changes.) Notes: svn path=/head/; revision=219362
* Work around gcc constant folding bugs.David Schultz2010-12-061-1/+6
| | | | Notes: svn path=/head/; revision=216223
* signbit() returns nonzero for negative arguments, but we shouldn't assumeDavid Schultz2010-12-066-6/+8
| | | | | | | that it always returns the same nonzero value. Notes: svn path=/head/; revision=216222
* Fix some warnings.David Schultz2010-12-051-3/+3
| | | | Notes: svn path=/head/; revision=216221