summaryrefslogtreecommitdiff
path: root/lib/libc/tests/stdio
Commit message (Collapse)AuthorAgeFilesLines
* Conform to Berne Convention.Cy Schubert2018-05-221-1/+1
| | | | | | | MFC after: 3 days Notes: svn path=/head/; revision=334022
* Add new gets_s(3) stdio function.Cy Schubert2018-04-032-0/+146
| | | | | | | | | | | | | | This implements the gets_s(3) function as documented at http://en.cppreference.com/w/c/io/gets. It facilitates the optional removal of gets(3). Reviewed by: ed MFC after: 2 weeks Relnotes: yes Differential Revision: https://reviews.freebsd.org/D12785 Notes: svn path=/head/; revision=331936
* DIRDEPS_BUILD: Update dependencies.Bryan Drewery2017-10-311-1/+0
| | | | | | | Sponsored by: Dell EMC Isilon Notes: svn path=/head/; revision=325188
* Expect :int_within_limits to fail when ptrdiff_t/*intmax_t differ in base typeEnji Cooper2017-02-071-0/+5
| | | | | | | | | | | | | | | | The %t{d,u} (ptrdiff_t) tests fail for the following reasons: - ptrdiff_t is by definition int32_t on !LP64 architectures and int64_t on LP64 architectures. - intmax_t is by definition fixed to int64_t on all architectures. - Some of the code in lib/libc/stdio/... is promoting ptrdiff_t to *intmax_t when parsing/representing the value. PR: 191674 MFC after: 1 week Sponsored by: Dell EMC Isilon Notes: svn path=/head/; revision=313379
* Wrap strcmp/wcscmp calls with ATF_CHECK_MSG and drop atf_tc_fail useEnji Cooper2017-02-071-10/+7
| | | | | | | | | | | | | | The reasoning here was the same as what was done in r313376: - Gather as many results as possible instead of failing early and not testing the rest of the cases. - Simplify logic when checking test inputs vs outputs and printing test result. MFC after: 1 week Sponsored by: Dell EMC Isilon Notes: svn path=/head/; revision=313378
* Fix :hexadecimal_floating_point on i386Enji Cooper2017-02-071-11/+8
| | | | | | | | | | | | | | | | | | | Don't exclude i386 from LDBL_MANT_DIG == 64; it works properly in that case. While here, replace strcmp + atf_tc_fail with ATF_CHECK_MSG for 2 reasons: - Gather as many results as possible instead of failing early and not testing the rest of the cases. - Simplify logic when checking test inputs vs outputs and printing test result. Tested on: amd64, i386 MFC after: 1 week Sponsored by: Dell EMC Isilon Notes: svn path=/head/; revision=313376
* Fix typos: use correct string format and value to compare.Ruslan Bukin2016-10-131-2/+2
| | | | | | | | | Sponsored by: DARPA, AFRL Sponsored by: HEIF5 Differential Revision: https://reviews.freebsd.org/D8226 Notes: svn path=/head/; revision=307220
* Similar to r305920, remove spurious newlines from ATF_REQUIRE_MSG callsEnji Cooper2016-09-182-6/+6
| | | | | | | | MFC after: 1 week Sponsored by: Dell EMC Isilon Notes: svn path=/head/; revision=305921
* Remove spurious newlines from atf_tc_fail callsEnji Cooper2016-09-182-4/+4
| | | | | | | | | | | This changes the results from broken (incorrect) to failed (correct) on i386 MFC after: 1 week Sponsored by: Dell EMC Isilon Notes: svn path=/head/; revision=305920
* Checkpoint initial integration workEnji Cooper2016-08-122-1/+2
| | | | | | | | | | | | - Some of the lib/libc and lib/thr tests fail - lib/msun/exp_test:exp2_values now passes with clang 3.8.0 The Makefiles in contrib/netbsd-tests were pruned as they have no value Sponsored by: EMC / Isilon Storage Division Notes: svn path=/projects/netbsd-tests-update-12/; revision=304003
* Remove last traces of _WITH_GETLINEBaptiste Daroussin2016-07-301-1/+0
| | | | Notes: svn path=/head/; revision=303528
* print_positional_test: Fix misuse of wchar APIsConrad Meyer2016-05-121-3/+4
| | | | | | | | | | | These APIs take unit length, not byte length parameters. Reported by: Coverity CIDs: 1338543, 1338544, 1338545 Sponsored by: EMC / Isilon Storage Division Notes: svn path=/head/; revision=299511
* Merge ^/user/ngie/release-pkg-fix-tests to unbreak how test files are installedEnji Cooper2016-05-041-4/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | after r298107 Summary of changes: - Replace all instances of FILES/TESTS with ${PACKAGE}FILES. This ensures that namespacing is kept with FILES appropriately, and that this shouldn't need to be repeated if the namespace changes -- only the definition of PACKAGE needs to be changed - Allow PACKAGE to be overridden by callers instead of forcing it to always be `tests`. In the event we get to the point where things can be split up enough in the base system, it would make more sense to group the tests with the blocks they're a part of, e.g. byacc with byacc-tests, etc - Remove PACKAGE definitions where possible, i.e. where FILES wasn't used previously. - Remove unnecessary TESTSPACKAGE definitions; this has been elided into bsd.tests.mk - Remove unnecessary BINDIRs used previously with ${PACKAGE}FILES; ${PACKAGE}FILESDIR is now automatically defined in bsd.test.mk. - Fix installation of files under data/ subdirectories in lib/libc/tests/hash and lib/libc/tests/net/getaddrinfo - Remove unnecessary .include <bsd.own.mk>s (some opportunistic cleanup) Document the proposed changes in share/examples/tests/tests/... via examples so it's clear that ${PACKAGES}FILES is the suggested way forward in terms of replacing FILES. share/mk/bsd.README didn't seem like the appropriate method of communicating that info. MFC after: never probably X-MFC with: r298107 PR: 209114 Relnotes: yes Tested with: buildworld, installworld, checkworld; buildworld, packageworld Sponsored by: EMC / Isilon Storage Division Notes: svn path=/head/; revision=299094
* Fix double fclose of `fp1` when freopen failsEnji Cooper2016-04-201-1/+0
| | | | | | | | | | | | | | | freopen handles closing file descriptors on error, with the exception of fdopen'ed descriptors, so closing an already fclose'd file descriptor is incorrect CID: 1338525 Differential Revision: https://reviews.freebsd.org/D6013 MFC after: 2 weeks Reported by: Coverity Sponsored by: EMC / Isilon Storage Division Notes: svn path=/head/; revision=298312
* Make sure fmemopen succeeds in :test_append_binary_pos before calling ftellEnji Cooper2016-04-191-0/+2
| | | | | | | | | | | | | | on the FILE object This fixes potential null pointer dereferences on failure CID: 1254952 MFC after: 2 weeks Reported by: Coverity Sponsored by: EMC / Isilon Storage Division Notes: svn path=/head/; revision=298311
* MFHGlen Barber2016-03-101-0/+21
|\ | | | | | | | | | | | | Sponsored by: The FreeBSD Foundation Notes: svn path=/projects/release-pkg/; revision=296625
| * DIRDEPS_BUILD: Connect MK_TESTS.Bryan Drewery2016-03-091-0/+21
| | | | | | | | | | | | | | Sponsored by: EMC / Isilon Storage Division Notes: svn path=/head/; revision=296587
* | First pass to fix the 'tests' packages.Glen Barber2016-02-021-0/+4
|/ | | | | | | Sponsored by: The FreeBSD Foundation Notes: svn path=/projects/release-pkg/; revision=295171
* Delete bogus freeing of uninitialized dataEnji Cooper2015-12-081-1/+0
| | | | | | | | | MFC after: 3 days Reported by: cppcheck Sponsored by: EMC / Isilon Storage Division Notes: svn path=/head/; revision=291981
* Add missing va_ends for corresponding va_starts to clean up variable argumentsEnji Cooper2015-12-082-0/+4
| | | | | | | | | | | initialized in _test_fmt(..) MFC after: 3 days Reported by: cppcheck Sponsored by: EMC / Isilon Storage Division Notes: svn path=/head/; revision=291980
* Initialize errno to 0 in the nul testcase before testing itEnji Cooper2015-12-051-0/+1
| | | | | | | | | | For some odd reason stable/10 requires this, otherwise it always fails the errno == 0 check on line 196. Sponsored by: EMC / Isilon Storage Division Notes: svn path=/head/; revision=291839
* Fix LDADD/DPADD that should be LIBADD.Bryan Drewery2015-12-041-5/+2
| | | | | | | Sponsored by: EMC / Isilon Storage Division Notes: svn path=/head/; revision=291738
* Disable -Wformat with scanfloat_test when compiling with gcc to avoid aEnji Cooper2015-11-151-0/+8
| | | | | | | | | | | | "use of assignment suppression and length modifier together in scanf format" warning on line 90 (it's intentional) MFC after: 1 week X-MFC with: r290537, r290856, r290860 Sponsored by: EMC / Isilon Storage Division Notes: svn path=/head/; revision=290871
* Remove unused variables to fix building worldBaptiste Daroussin2015-11-154-13/+2
| | | | Notes: svn path=/head/; revision=290860
* Fix the Indian numbering system (hi_IN.ISCII-DEV) testsEnji Cooper2015-11-151-4/+4
| | | | | | | | | Submitted by: ache X-MFC with: r290494 (if that ever happens) Sponsored by: EMC / Isilon Storage Division Notes: svn path=/head/; revision=290842
* Convert print_positional_test over to ATFEnji Cooper2015-11-081-16/+40
| | | | | | | | | | | Somehow missed in r290537 X-MFC with: r290537 MFC after: 1 week Sponsored by: EMC / Isilon Storage Division Notes: svn path=/head/; revision=290560
* printfloat_test and scanfloat_test need symbols from msun; these are ↵Enji Cooper2015-11-081-0/+6
| | | | | | | | | | | | | | | automatically provided on amd64, but not i386. Add libm to DPADD/LDADD to unbreak the i386 tinderbox Pointyhat to: ngie MFC after: 1 week X-MFC with: r290538 Sponsored by: EMC / Isilon Storage Division Notes: svn path=/head/; revision=290540
* Integrate tools/regression/lib/libc/stdio into the FreeBSD test suiteEnji Cooper2015-11-0814-23/+2613
| | | | | | | | | | | | | | as lib/libc/tests/stdio - Fix some whitespace - Convert the testcases to ATF - Convert "/dev/null" to _PATH_DEVNULL MFC after: 1 week Sponsored by: EMC / Isilon Storage Division Notes: svn path=/head/; revision=290537
* Refactor the test/ Makefiles after recent changes to bsd.test.mk (r289158) andEnji Cooper2015-10-121-2/+0
| | | | | | | | | | | | | | | netbsd-tests.test.mk (r289151) - Eliminate explicit OBJTOP/SRCTOP setting - Convert all ad hoc NetBSD test integration over to netbsd-tests.test.mk - Remove unnecessary TESTSDIR setting - Use SRCTOP where possible for clarity MFC after: 2 weeks Sponsored by: EMC / Isilon Storage Divison Notes: svn path=/head/; revision=289172
* In this context fclose() can never fail, so assert it in the testXin LI2015-09-291-0/+1
| | | | | | | case. Notes: svn path=/head/; revision=288382
* Convert tools/regression/lib/libc/stdio/test-fmemopen into an ATF testcase andEnji Cooper2014-11-162-0/+302
| | | | | | | | | rename as lib/libc/stdio/fmemopen2_test Sponsored by: EMC / Isilon Storage Division Notes: svn path=/head/; revision=274592
* Add reachover Makefiles for contrib/netbsd-tests/lib/libc; this adds ↵Enji Cooper2014-11-041-0/+17
approximately 500 new testcases Various TODOs have been sprinkled around the Makefiles for items that even need to be ported (missing features), testcases have issues with building/linking, or issues at runtime. A variant of this code has been tested extensively on amd64 and i386 10-STABLE/11-CURRENT for several months without issue. It builds on other architectures, but the code will remain off until I have prove it works on virtual hardware or real hardware on other architectures In collaboration with: pho, Casey Peel <casey.peel@isilon.com> Sponsored by: EMC / Isilon Storage Division Notes: svn path=/head/; revision=274075