test-perror: relax test to ignore cygwin bug
authorEric Blake <eblake@redhat.com>
Tue, 7 Jun 2011 21:41:20 +0000 (15:41 -0600)
committerEric Blake <eblake@redhat.com>
Tue, 7 Jun 2011 22:48:54 +0000 (16:48 -0600)
commitfd33cbeb2af00d79957ed51beeeadec715b0290a
treeae6aed7403316cb79f8da957474a4b98eb383b84
parentb47aace9f7ed314b66850c0d39303f2cdd65ef5f
test-perror: relax test to ignore cygwin bug

glibc was not the only platform where fprintf(fopen(,"r"))
fails to detect errors; cygwin 1.7.9 is another culprit
(although it will be fixed for 1.7.10), and I suspect that
several other platforms were failing perror2 for the same
reason.

At this point, there are so many functions affected, and
the way to avoid the bug is easy enough (don't pass bogus
streams to output-producing functions), that I'm not worried
about fixing things other than to document them.

* tests/test-perror2.c (main): Relax test on requiring detection
of stream errors, and use unbuffered stream.
* doc/posix-functions/dprintf.texi (dprintf): Document bug.
* doc/posix-functions/fprintf.texi (fprintf): Likewise.
* doc/posix-functions/fputc.texi (fputc): Likewise.
* doc/posix-functions/fputs.texi (fputs): Likewise.
* doc/posix-functions/fputws.texi (fputws): Likewise.
* doc/posix-functions/fwprintf.texi (fwprintf): Likewise.
* doc/posix-functions/fwrite.texi (fwrite): Likewise.
* doc/posix-functions/getopt.texi (getopt): Likewise.
* doc/posix-functions/perror.texi (perror): Likewise.
* doc/posix-functions/printf.texi (printf): Likewise.
* doc/posix-functions/psiginfo.texi (psiginfo): Likewise.
* doc/posix-functions/psignal.texi (psignal): Likewise.
* doc/posix-functions/putc.texi (putc): Likewise.
* doc/posix-functions/putc_unlocked.texi (putc_unlocked):
Likewise.
* doc/posix-functions/putchar.texi (putchar): Likewise.
* doc/posix-functions/putchar_unlocked.texi (putchar_unlocked):
Likewise.
* doc/posix-functions/puts.texi (puts): Likewise.
* doc/posix-functions/putwc.texi (putwc): Likewise.
* doc/posix-functions/putwchar.texi (putwchar): Likewise.
* doc/posix-functions/vdprintf.texi (vdprintf): Likewise.
* doc/posix-functions/vfprintf.texi (vfprintf): Likewise.
* doc/posix-functions/vfwprintf.texi (vfwprintf): Likewise.
* doc/posix-functions/vprintf.texi (vprintf): Likewise.
* doc/posix-functions/vwprintf.texi (vwprintf): Likewise.
* doc/posix-functions/wordexp.texi (wordexp): Likewise.
* doc/posix-functions/wprintf.texi (wprintf): Likewise.

Signed-off-by: Eric Blake <eblake@redhat.com>
28 files changed:
ChangeLog
doc/posix-functions/dprintf.texi
doc/posix-functions/fprintf.texi
doc/posix-functions/fputc.texi
doc/posix-functions/fputs.texi
doc/posix-functions/fputws.texi
doc/posix-functions/fwprintf.texi
doc/posix-functions/fwrite.texi
doc/posix-functions/getopt.texi
doc/posix-functions/perror.texi
doc/posix-functions/printf.texi
doc/posix-functions/psiginfo.texi
doc/posix-functions/psignal.texi
doc/posix-functions/putc.texi
doc/posix-functions/putc_unlocked.texi
doc/posix-functions/putchar.texi
doc/posix-functions/putchar_unlocked.texi
doc/posix-functions/puts.texi
doc/posix-functions/putwc.texi
doc/posix-functions/putwchar.texi
doc/posix-functions/vdprintf.texi
doc/posix-functions/vfprintf.texi
doc/posix-functions/vfwprintf.texi
doc/posix-functions/vprintf.texi
doc/posix-functions/vwprintf.texi
doc/posix-functions/wordexp.texi
doc/posix-functions/wprintf.texi
tests/test-perror2.c