History log of /freebsd-10.1-release/tools/regression/lib/libc/stdio/
Revision Date Author Comments
272461 03-Oct-2014 gjb

Copy stable/10@r272459 to releng/10.1 as part of
the 10.1-RELEASE process.

Approved by: re (implicit)
Sponsored by: The FreeBSD Foundation


256281 10-Oct-2013 gjb

Copy head (r256279) to stable/10 as part of the 10.0-RELEASE cycle.

Approved by: re (implicit)
Sponsored by: The FreeBSD Foundation


255303 06-Sep-2013 jilles

libc/stdio: Allow fopen/freopen modes in any order (except initial r/w/a).

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.


255302 06-Sep-2013 jilles

libc/stdio: Run mkostemp test using prove.


255301 06-Sep-2013 jilles

libc/stdio: Provide proper TAP output for fmemopen/open_[w]memstream.

A *.t file should provide Test Anything Protocol output so that it can be
run using the Perl "prove" tool.


254151 09-Aug-2013 jilles

Add mkostemp() and mkostemps().

These are like mkstemp() and mkstemps() but allow passing open(2) flags like
O_CLOEXEC.


247411 27-Feb-2013 jhb

Add an implementation of open_memstream() and open_wmemstream(). These
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


246206 01-Feb-2013 gahr

- Fix more style(9)-related issues (copyright header, spaces after function
names, unnecessary casts)
- Change type of boolean variable from char to bool

Suggested by: jhb, zont, jmallett
Reviewed by: cognet
Approved by: cognet


246148 31-Jan-2013 gahr

- Remove underscores from the internal structure name, as it doesn't collide
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


246120 30-Jan-2013 gahr

Add fmemopen(3), an interface to get a FILE * from a buffer in memory, along
with the respective regression test.
See http://pubs.opengroup.org/onlinepubs/9699919799/functions/fmemopen.html

Reviewed by: cognet
Approved by: cognet


244038 08-Dec-2012 jilles

libc: Add a missing header to a test program.

Usage of dup(), mkstemp() and unlink() needs <unistd.h>.


230115 14-Jan-2012 das

Add .t files for tests, missed in prior checkins, so that prove(1) works
in this directory.


230114 14-Jan-2012 das

Update the tests for arm and other ports where long double is the same
as double, similar to r178141.


197753 04-Oct-2009 das

Regression tests for r197752 (handling of empty/NULL buffers).


190773 06-Apr-2009 das

Return -1 instead of 0 upon reaching EOF. This is somewhat ill-advised
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@


189142 28-Feb-2009 das

Tests for getdelim().


189141 28-Feb-2009 das

Add a file containing tests for simple format specifiers.
Currently it only has tests for a few sign issues with integer
formats, including PR 131880.


187963 31-Jan-2009 das

Test wprintf() in addition to printf().


182711 03-Sep-2008 das

Regression tests for bugs in gdtoa.


180103 29-Jun-2008 das

Add some regression tests for printf() with positional arguments.
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.


179919 21-Jun-2008 das

Regression test for a recently fixed strtod bug.


178141 12-Apr-2008 das

Updates for changes in the way printf() handles hex floating point
numbers.


174495 09-Dec-2007 das

Remove some test instrumentation. (The Symbol.map changes broke it anyway.)


174228 03-Dec-2007 das

Make sure we set the locale to "C" when testing thousands' separator
support, rather than just "", which refers to the system default based
on the environment.


174205 03-Dec-2007 das

Tests for rounding, and for the leading 0's bug.


165754 03-Jan-2007 das

Remove the test that ensures that when the string "nan(...)" is converted
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.


165748 03-Jan-2007 das

Fix cut-and-paste bugs in the regression tests.


142843 01-Mar-2005 das

- Split tests into three rough categories.
- 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. :-(


142842 01-Mar-2005 das

- Split the printfloat test into 11 individually wrapped and packaged
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.


137587 11-Nov-2004 nik

Switch over to a different, more flexible test output protocol that's
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.


136497 13-Oct-2004 keramida

Add a regression test for floating-point output in the Greek locale.
See revision 1.3 of src/share/numericdef/el_GR.ISO8859-7.src

Reviewed by: das (a while ago)


124708 19-Jan-2004 das

Add regression tests for printf's %a/%A formats.

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).


124707 19-Jan-2004 das

Add regression tests for some of the bugs recently discovered in the
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).


124650 18-Jan-2004 das

Work around a recently-introduced gcc bug. The compiler no longer
accepts certain floating point constant representations that are
legal in C99.


116969 28-Jun-2003 das

Add regression tests for floating point parsing in scanf(3).


113724 19-Apr-2003 das

Add a dozen new tests with the general theme of getting trailing
zeroes right.


113469 14-Apr-2003 das

Add a test case for printf("%5.0f", 0.001).


113192 07-Apr-2003 das

Additional regression tests for grouping, parsing of '.*', and printing
of %f formats where the number of significant digits is < expt.


113162 06-Apr-2003 tjr

Test for bug in revision 1.54 of vfprintf.c.


113147 05-Apr-2003 das

Regression tests for printf()'s floating point formats.
Tests for correct printing of subnormals are lacking.


108088 19-Dec-2002 tjr

Add a test program for perror() that demonstrates two bugs in the
current implementation.