summaryrefslogtreecommitdiffstats
path: root/tools/regression/lib/libc/stdio
Commit message (Collapse)AuthorAgeFilesLines
* Remove stale tools/regression directory that should have been deletedngie2015-12-0525-2296/+0
| | | | | | in r291840 Sponsored by: EMC / Isilon Storage Division
* MFC r264737:ngie2015-11-255-1/+237
| | | | | | | | | | | | | | | Discussed with: jilles r264737 (by jilles): libc/stdio: Fail fdopen() on an execute-only fd. An execute-only fd (opened with O_EXEC) allows neither read() nor write() and is therefore incompatible with all stdio modes. Therefore, the [EINVAL] error applies. Also adjust the similar check in freopen() with a NULL path, even though this checks an fd which is already from a FILE.
* MFC 281887:jhb2015-06-022-2/+2
| | | | | Reassign copyright statements on several files from Advanced Computing Technologies LLC to Hudson River Trading LLC.
* MFC r277453:ngie2015-01-231-15/+0
| | | | | | | | r277453 (by ngie): Garbage collect a prove test wrapper Sponsored by: EMC / Isilon Storage Division
* MFC r267004,r274592:ngie2015-01-202-302/+11
| | | | | | | | | | | | | | | | r267004 (by gahr): - Use strlen instead of hardcoding a number - Terminate a sentence with a period Approved by: cognet r274592 (by ngie): Convert tools/regression/lib/libc/stdio/test-fmemopen into an ATF testcase and rename as lib/libc/stdio/fmemopen2_test Sponsored by: EMC / Isilon Storage Division
* MFC discussed with: jilles, -developersngie2015-01-111-0/+47
| | | | | | | | | | | | | MFC r266971: - Return NULL and set errno to EINVAL if size is 0 (as required by POSIX). Update the manpage to reflect this change. - Always set the current position to the first null-byte when opening in append mode. This makes the implementation compatible with glibc's. Update the test suite. Reported by: pho Approved by: cognet
* libc/stdio: Allow fopen/freopen modes in any order (except initial r/w/a).jilles2013-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.
* libc/stdio: Run mkostemp test using prove.jilles2013-09-061-0/+10
|
* libc/stdio: Provide proper TAP output for fmemopen/open_[w]memstream.jilles2013-09-063-3/+18
| | | | | A *.t file should provide Test Anything Protocol output so that it can be run using the Perl "prove" tool.
* Add mkostemp() and mkostemps().jilles2013-08-092-3/+167
| | | | | These are like mkstemp() and mkstemps() but allow passing open(2) flags like O_CLOEXEC.
* 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>.
* 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.
* Regression tests for r197752 (handling of empty/NULL buffers).das2009-10-041-1/+20
|
* 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.
* Test wprintf() in addition to printf().das2009-01-311-3/+19
|
* Regression tests for bugs in gdtoa.das2008-09-031-11/+17
|
* Add some regression tests for printf() with positional arguments.das2008-06-292-1/+133
| | | | | | | | | The first test comes from OpenBSD, and the others are additions or adaptations. This is based on OpenBSD's src/regress/lib/libc/sprintf/sprintf_test.c, v1.3. I deliberately did not use v1.4 because it's bogus.
* Regression test for a recently fixed strtod bug.das2008-06-211-1/+11
|
* Updates for changes in the way printf() handles hex floating pointdas2008-04-121-5/+5
| | | | numbers.
* Remove some test instrumentation. (The Symbol.map changes broke it anyway.)das2007-12-091-4/+0
|
* Make sure we set the locale to "C" when testing thousands' separatordas2007-12-031-2/+2
| | | | | support, rather than just "", which refers to the system default based on the environment.
* Tests for rounding, and for the leading 0's bug.das2007-12-031-1/+13
|
* Remove the test that ensures that when the string "nan(...)" is converteddas2007-01-031-0/+8
| | | | | | to floating-point, the result is a quiet NaN. The current implementation may return a signaling NaN, and the vendor has no plans for changing this, for reasons explained in the comment I added.
* Fix cut-and-paste bugs in the regression tests.das2007-01-031-2/+2
|
* - Split tests into three rough categories.das2005-03-011-6/+98
| | | | | | | | | | | - Use fesetround() instead of fpsetround(), and add tests for various rounding modes. - Test that all NaNs generated are quiet. Some of these tests won't pass until problems in vendor sources (gdtoa and gcc) are fixed and new versions imported, but I want to get these changes into the tree before I accidentally blow them away again. :-(
* - Split the printfloat test into 11 individually wrapped and packageddas2005-03-012-8/+100
| | | | | | | | | | | | | | tests. (Buy 10, get one free!) The separate categories were already there; they just weren't labeled. - Use fesetround() instead of fpsetround(), since the former is standard and implemented on all supported architectures. Add tests for each rounding mode. - Add additional tests for subnormals. Some of these tests won't pass until problems in vendor sources (gdtoa and gcc) are fixed and new versions imported, but I want to get these changes into the tree before I accidentally blow them away.
* Switch over to a different, more flexible test output protocol that'snik2004-11-116-3/+38
| | | | | | | | | | | | | | | | | | | | understood by Perl's Test::Harness module and prove(1) commands. Update README to describe the new protocol. The work's broken down into two main sets of changes. First, update the existing test programs (shell scripts and C programs) to produce output in the ok/not ok format, and to, where possible, also produce a header describing the number of tests that are expected to be run. Second, provide the .t files that actually run the tests. In some cases these are copies of, or very similar too, scripts that already existed. I've kept the old scripts around so that it's possible to verify that behaviour under this new system (in terms of whether or not a test fails) is identical to the behaviour under the old system. Add a TODO file.
* Add a regression test for floating-point output in the Greek locale.keramida2004-10-131-0/+7
| | | | | | See revision 1.3 of src/share/numericdef/el_GR.ISO8859-7.src Reviewed by: das (a while ago)
* Add regression tests for printf's %a/%A formats.das2004-01-191-1/+38
| | | | | | While here, disable some of the long double tests on i386, since FreeBSD/i386 is the only port that doesn't evaluate long doubles in their full precision (due to constant folding bugs in gcc).
* Add regression tests for some of the bugs recently discovered in thedas2004-01-191-4/+15
| | | | | | | | vendor's strtod() implementation. While here, disable some of the long double tests on i386, since FreeBSD/i386 is the only port that doesn't evaluate long doubles in their full precision (due to constant folding bugs in gcc).
* Work around a recently-introduced gcc bug. The compiler no longerdas2004-01-181-1/+1
| | | | | accepts certain floating point constant representations that are legal in C99.
* Add regression tests for floating point parsing in scanf(3).das2003-06-282-1/+181
|
* Add a dozen new tests with the general theme of getting trailingdas2003-04-191-0/+12
| | | | zeroes right.
* Add a test case for printf("%5.0f", 0.001).das2003-04-141-0/+2
|
* Additional regression tests for grouping, parsing of '.*', and printingdas2003-04-071-0/+9
| | | | of %f formats where the number of significant digits is < expt.
* Test for bug in revision 1.54 of vfprintf.c.tjr2003-04-061-0/+3
|
* Regression tests for printf()'s floating point formats.das2003-04-052-1/+168
| | | | Tests for correct printing of subnormals are lacking.
* Add a test program for perror() that demonstrates two bugs in thetjr2002-12-192-0/+116
current implementation.
OpenPOWER on IntegriCloud