about summary refs log tree commit diff
path: root/stdio-common
Commit message (Collapse)AuthorAgeFilesLines
* Split up rules for tests that compare output with baselines.Joseph Myers2014-02-141-2/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch splits makefile rules that generate a file then run cmp to check the contents of that file into separate rules to generate and compare the file. This simplifies making those tests generate PASS / FAIL results, by removing the need to insert && between commands in the test so that a $(evaluate-test) call is reached. It also avoids the oddity of the .out file being an intermediate file rather than the final result generated, as noted for some of these tests in <https://sourceware.org/ml/libc-alpha/2012-10/msg00894.html>. In many cases, the rule to run the program was no longer needed because the default rules for running test programs on the host to generate a .out file sufficed. (I'm not asserting the commands run after this patch are *exactly* the same as before, simply that the rules did nothing special that appeared deliberate or relevant to anything about what the tests were testing. In cases where the rules redirected stderr as well as stdout, I left the existing rule's redirection in place to avoid changing what gets compared with the expected results.) It's clear there is a lot in common between the various -cmp.out rules and it might be possible in future to refactor them into more generic support for the case of comparing test output against a baseline. (Some baselines are *.exp, some *.expect, some directly embedded in the makefiles, and nptl/tst-cleanupx0.expect appears unused.) Tested x86_64. * elf/Makefile ($(objpfx)order.out): Remove rule. [$(run-built-tests) = yes] (tests): Depend on $(objpfx)order-cmp.out. ($(objpfx)order-cmp.out): New rule. [$(run-built-tests) = yes] (tests): Depend on $(objpfx)tst-array1-cmp.out, $(objpfx)tst-array1-static-cmp.out, $(objpfx)tst-array2-cmp.out, $(objpfx)tst-array3-cmp.out, $(objpfx)tst-array4-cmp.out, $(objpfx)tst-array5-cmp.out and $(objpfx)tst-array5-static-cmp.out. ($(objpfx)tst-array1.out): Remove rule. ($(objpfx)tst-array1-cmp.out): New rule. ($(objpfx)tst-array1-static.out): Remove rule. ($(objpfx)tst-array1-static-cmp.out): New rule. ($(objpfx)tst-array2.out): Remove rule. ($(objpfx)tst-array2-cmp.out): New rule. ($(objpfx)tst-array3.out): Remove rule. ($(objpfx)tst-array3-cmp.out): New rule. ($(objpfx)tst-array4.out): Remove rule. ($(objpfx)tst-array4-cmp.out): New rule. ($(objpfx)tst-array5.out): Remove rule. ($(objpfx)tst-array5-cmp.out): New rule. ($(objpfx)tst-array5-static.out): Remove rule. ($(objpfx)tst-array5-static-cmp.out): New rule. [$(run-built-tests) = yes] (tests): Depend on $(objpfx)order2-cmp.out. ($(objpfx)order2.out): Remove rule. ($(objpfx)order2-cmp.out): New rule. ($(objpfx)tst-initorder.out): Remove rule. [$(run-built-tests) = yes] (tests): Depend on $(objpfx)tst-initorder-cmp.out. ($(objpfx)tst-initorder-cmp.out): New rule. ($(objpfx)tst-initorder2.out): Remove rule. [$(run-built-tests) = yes] (tests): Depend on $(objpfx)tst-initorder2-cmp.out. ($(objpfx)tst-initorder2-cmp.out): New rule. [$(run-built-tests) = yes] (tests): Depend on $(objpfx)tst-unused-dep-cmp.out. ($(objpfx)tst-unused-dep-cmp.out): Do not run cmp. ($(objpfx)tst-unused-dep-cmp.out): New rule. * stdio-common/Makefile [$(run-built-tests) = yes] (tests): Depend on $(objpfx)tst-setvbuf1-cmp.out. ($(objpfx)tst-setvbuf1.out): Do not run cmp. ($(objpfx)tst-setvbuf1-cmp.out): New rule. * string/Makefile [$(run-built-tests) = yes] (tests): Depend $(objpfx)tst-svc-cmp.out instead of $(objpfx)tst-svc.out. ($(objpfx)tst-svc.out): Remove rule. ($(objpfx)tst-svc-cmp.out): New rule. nptl: * Makefile ($(objpfx)tst-cleanup0.out): Do not run cmp. [$(run-built-tests) = yes] (tests): Depend on $(objpfx)tst-cleanup0-cmp.out. ($(objpfx)tst-cleanup0-cmp.out): New rule.
* Remove indirection in stdio-common tests dependencies.Joseph Myers2014-02-121-4/+1
| | | | | | | | | | | | | | | stdio-common/Makefile has the tests target depend on two test output files indirectly through rules do-tst-unbputc and do-tst-printf. I see no reason for such an indirection, and everywhere else the tests just depend on the output files directly, so this patch removes the indirection. Tested x86_64. * stdio-common/Makefile (do-tst-unbputc): Remove target. (do-tst-printf): Likewise. (tests): Depend directly on $(objpfx)tst-unbputc.out and $(objpfx)tst-printf.out.
* Fix tst-sscanf and tst-swscanf on 64-bit.David S. Miller2014-02-111-1/+2
| | | | | * stdio-common/tst-sscanf.c (main): Use 'long' for 'dummy' when processing int_tests.
* Use glibc_likely instead __builtin_expect.Ondřej Bílka2014-02-105-44/+44
|
* Fix integer overflow in vfwprintf. Fixes bug 14286.Ondřej Bílka2014-01-071-1/+7
|
* Update copyright notices with scripts/update-copyrightsAllan McRae2014-01-0187-87/+87
|
* Do not let scanf("%4p") accept "(nil)". Fixes bug 16055Ondřej Bílka2013-11-182-1/+3
|
* Fix parsing of 0e+0 as floatAndreas Schwab2013-10-312-0/+36
|
* Let tst-swscanf find its localeAndreas Schwab2013-10-291-0/+1
|
* Fix typos.Yuri Chornoivan2013-10-121-1/+1
|
* Fix fwrite() reading beyond end of buffer in error pathEric Biggers2013-10-111-6/+6
| | | | | | | | | | | Partially revert commits 2b766585f9b4ffabeef2f36200c275976b93f2c7 and de2fd463b1c0310d75084b6d774fb974075a4ad9, which were intended to fix BZ#11741 but caused another, likely worse bug, namely that fwrite() and fputs() could, in an error path, read data beyond the end of the specified buffer, and potentially even write this data to the file. Fix BZ#11741 properly by checking the return value from _IO_padn() in stdio-common/vfprintf.c.
* PowerPC floating point little-endian [1 of 15]Alan Modra2013-10-043-17/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | http://sourceware.org/ml/libc-alpha/2013-08/msg00081.html This is the first of a series of patches to ban ieee854_long_double and the ieee854_long_double macros when using IBM long double. union ieee854_long_double just isn't correct for IBM long double, especially when little-endian, and pretending it is OK has allowed a number of bugs to remain undetected in sysdeps/ieee754/ldbl-128ibm/. This changes the few places in generic code that use it. * stdio-common/printf_size.c (__printf_size): Don't use union ieee854_long_double in fpnum union. * stdio-common/printf_fphex.c (__printf_fphex): Likewise. Use signbit macro to retrieve sign from long double. * stdio-common/printf_fp.c (___printf_fp): Use signbit macro to retrieve sign from long double. * sysdeps/ieee754/ldbl-128ibm/printf_fphex.c: Adjust for fpnum change. * sysdeps/ieee754/ldbl-128/printf_fphex.c: Likewise. * sysdeps/ieee754/ldbl-96/printf_fphex.c: Likewise. * sysdeps/x86_64/fpu/printf_fphex.c: Likewise. * math/test-misc.c (main): Don't use union ieee854_long_double. ports/ * sysdeps/ia64/fpu/printf_fphex.c: Adjust for fpnum change.
* Fix tst-long-dbl-fphex swprintf length calculation.Olivier Langlois2013-09-241-2/+2
|
* Fix typos.Ondřej Bílka2013-08-301-1/+1
|
* Avoid use of "register" as optimization hint.Joseph Myers2013-06-078-25/+25
|
* Fix leading whitespaces.Ondrej Bilka2013-06-061-1/+1
|
* Remove trailing whitespace.Joseph Myers2013-06-051-1/+1
|
* * stdio-common/bug26.c (main): Correct fscanf template.Thomas Schwinge2013-05-261-2/+3
| | | | Fixup for commit 6ecec3b616aeaf121c68c1053cd17fdcf0cdb5a2.
* Fix coding-style violation.Thomas Schwinge2013-04-151-4/+4
| | | | Introduced in commit ee091edf1a16312fff0cc3c6ae0116aded7f1dbf.
* Don't accept exp char without preceding digits in scanf float parsingAndreas Schwab2013-04-113-6/+49
|
* More tests for external charater sequences representing NaNs.Thomas Schwinge2013-04-051-1/+61
|
* Properly collect individual tests' results.Thomas Schwinge2013-04-051-5/+5
| | | | Fixup for commit 003c9895a89e71767ad64bafac1ca99622be2eb7.
* Better distinguish between NaN/qNaN/sNaN.Thomas Schwinge2013-03-151-18/+20
|
* Remove unused declarations.Thomas Schwinge2013-03-151-3/+0
| | | | | Added in commit f83af095b6fc49de3914f4426202171341783277, and forgotten to be removed in commit 76f2646f3dbe45d3ed53a0c73fa52f1595306b35.
* Replace __builtin_expect(..., 0) with __glibc_unlikely().Paul Pluzhnikov2013-03-051-19/+19
|
* * stdio-common/vfprintf.c (vfprintf): Check malloc return; don'tPaul Pluzhnikov2013-03-051-4/+13
| | | | call free(NULL).
* Remove __ptrvalue, __bounded and __unbounded.Joseph Myers2013-02-131-2/+2
|
* Add --enable-hardcoded-path-in-tests configure optionH.J. Lu2013-01-113-7/+7
|
* Update copyright notices with scripts/update-copyrights.Joseph Myers2013-01-0286-95/+86
|
* Add script to update copyright notices and reformat some to facilitate its use.Joseph Myers2013-01-011-2/+1
|
* Add newline to last test in stdio-common/tst-put-error.cSiddhesh Poyarekar2012-12-061-1/+11
| | | | | The newline ensures that the buffer is flushed and the test executes as expected.
* Increase width of padded output in stdio-common/tst-put-error.Joseph Myers2012-12-051-1/+1
|
* Fix more set-but-not-used warnings in _itowa.c.Joseph Myers2012-11-201-2/+4
|
* printf should return negative value on errorSiddhesh Poyarekar2012-11-162-4/+50
| | | | | | [BZ #11741] Fixed bug where printf and family may return a spurious success when printing padded formats.
* [BZ #157] Remove include/stub-tag.h for good.Thomas Schwinge2012-11-046-6/+0
|
* Define and use $(run-built-tests).Joseph Myers2012-10-241-1/+1
|
* 2012-09-28 Andreas Schwab <schwab@linux-m68k.org>Jeff Law2012-09-283-36/+17
| | | | | | | | | | | | | | [BZ #6530] * stdio-common/vfprintf.c (process_string_arg): Revert 2000-07-22 change. 2011-09-28 Jonathan Nieder <jrnieder@gmail.com> * stdio-common/Makefile (tst-sprintf-ENV): Set environment for testcase. * stdio-common/tst-sprintf.c: Include <locale.h> (main): Test sprintf's handling of incomplete multibyte characters.
* Set "fail on error" mode directly in testsuite shell scriptsDmitry V. Levin2012-09-253-9/+11
|
* Make printf respect the rounding mode for hex output (bug 5044).Joseph Myers2012-09-242-13/+151
|
* Make printf respect the rounding mode for decimal output (bug 5044).Joseph Myers2012-09-143-30/+142
|
* Fix last patch: Add missing DUMMY variableAndreas Jaeger2012-08-181-2/+2
|
* Clean up definition of _LIBC_REENTRANT and _IO_MTSAFE_IO.Roland McGrath2012-08-172-3/+5
|
* Suppress -Wunused-but-set warnings in GMP code.Roland McGrath2012-08-162-9/+15
|
* Fix lots of bitrot for stub configurations.Roland McGrath2012-07-305-5/+37
|
* Remove use of INTDEF/INTUSE in stdio-commonAndreas Schwab2012-06-015-39/+16
|
* 2012-05-24 Jeff Law <law@redhat.com>Jeff Law2012-05-242-1/+72
| | | | | * stdio-common/Makefile (tests): Add bug25. * stdio-common/bug25.c: New test.
* Remove use of INTDEF/INTUSE in libioAndreas Schwab2012-05-2418-58/+54
|
* [BZ #13691], Revert breakage of iconv() converter for TCVN-5712.Andreas Jaeger2012-05-212-12/+1
| | | | | | | | | | | | | | | | | | * iconvdata/tcvn5712-1.c (BODY for FROM_LOOP): Don't consider inptr and inend for must_buffer_ch. * wcsmbs/tst-mbsnrtowcs.c: Remove file. * wcsmbs/Makefile (tests): Remove tst-mbsnrtowcs. * stdio-common/Makefile (tests): Remove bug15. (bug15-ENV): Remove macro. * stdio-common/bug15.c: Remove, we do not support vi_VN.TCVN5712-1 anymore. localedata: * SUPPORTED: Remove vi_VN.TCVN/TCVN5712-1. * tst-strptime.c: Remove, we do not support vi_VN.TCVN5712-1 anymore. * Makefile (LOCALES): Remove vi_VN.TCVN5712-1 from list. (tests): Remove tst-strptime.
* Check _ITOA_NEEDED and use _ITOA_WORD_TYPEH.J. Lu2012-05-181-5/+6
|
* Bump up stdio bug22 timeout from 30 seconds to 60 secondsChris Metcalf2012-05-171-1/+1
| | | | | The older Tilera platform (tilepro) needs just a hair over 30 seconds to run this on one core.