aboutsummaryrefslogtreecommitdiff
path: root/tools/regression/lib/libc
Commit message (Collapse)AuthorAgeFilesLines
* Remove $FreeBSD$: one-line sh patternWarner Losh2023-08-161-1/+0
| | | | Remove /^\s*#[#!]?\s*\$FreeBSD\$.*$\n/
* Integrate tools/regression/lib/libc/nss into the FreeBSD test suite asEnji Cooper2015-12-1620-5430/+0
| | | | | | | | | | | | | | | | | | | | lib/libc/tests/nss - Convert the testcases to ATF - Do some style(9) cleanups: -- Sort headers -- Apply indentation fixes -- Remove superfluous parentheses - Explicitly print out debug printfs for use with `kyua {debug,report}`; for items that were overly noisy, they've been put behind #ifdef DEBUG conditionals - Fix some format strings MFC after: 1 week Sponsored by: EMC / Isilon Storage Division Notes: svn path=/head/; revision=292323
* Integrate tools/regression/lib/libc/resolv into the FreeBSD test suite asEnji Cooper2015-12-164-410/+0
| | | | | | | | | | | | lib/libc/tests/resolv Convert the testcases to ATF MFC after: 1 week Sponsored by: EMC / Isilon Storage Division Notes: svn path=/head/; revision=292317
* Remove hosts that don't resolve properly with the nss and resolv testsEnji Cooper2015-12-162-94/+0
| | | | | | | | MFC after: 1 week Sponsored by: EMC / Isilon Storage Division Notes: svn path=/head/; revision=292316
* Fix LDADD/DPADD that should be LIBADD.Bryan Drewery2015-12-041-2/+1
| | | | | | | Sponsored by: EMC / Isilon Storage Division Notes: svn path=/head/; revision=291738
* Clean up trailing whitespaceEnji Cooper2015-11-269-583/+582
| | | | | | | MFC after: 1 week Notes: svn path=/head/; revision=291363
* r291359 was incorrect. Skip over tokens that start with `#' as fgetln canEnji Cooper2015-11-261-3/+4
| | | | | | | | | | | | return more than one '\n' delimited line in a buffer Handle empty lines too, just in case MFC after: 3 days X-MFC with: r291359 Notes: svn path=/head/; revision=291362
* Skip over lines that start with # (comments)Enji Cooper2015-11-261-0/+2
| | | | | | | MFC after: 3 days Notes: svn path=/head/; revision=291359
* Remove cnftp.bjpu.edu.cn (it no longer resolves)Enji Cooper2015-11-262-2/+2
| | | | | | | | | Add localhost to resolv/mach for parity with nss/mach MFC after: 3 days Notes: svn path=/head/; revision=291358
* Integrate tools/regression/lib/libc/gen into the FreeBSD test suiteEnji Cooper2015-11-098-1490/+0
| | | | | | | | | | | | | | | | | | | | | | as lib/libc/tests/gen The code in test-fnmatch that was used for generating: - bin/sh/tests/builtins/case2.0 - bin/sh/tests/builtins/case3.0 has been left undisturbed. The target `make sh-tests` has been moved over from tools/regression/lib/libc/gen/Makefile to lib/libc/tests/gen/Makefile and made into a PHONY target case2.0 and case3.0 test input generation isn't being done automatically. This needs additional discussion. MFC after: 1 week Sponsored by: EMC / Isilon Storage Division Notes: svn path=/head/; revision=290572
* Integrate tools/regression/lib/libc/net into the FreeBSD test suiteEnji Cooper2015-11-088-459/+0
| | | | | | | | | | | | | as lib/libc/tests/net Also, fix eui64_aton_test:test_str(..). The test was comparing the result of eui64_aton to a pointer of the expected result. MFC after: 1 week Sponsored by: EMC / Isilon Storage Division Notes: svn path=/head/; revision=290563
* Integrate tools/regression/lib/libc/string into the FreeBSD test suiteEnji Cooper2015-11-086-436/+0
| | | | | | | | | | as lib/libc/tests/string MFC after: 1 week Sponsored by: EMC / Isilon Storage Division Notes: svn path=/head/; revision=290539
* Integrate tools/regression/lib/libc/stdlib into the FreeBSD test suiteEnji Cooper2015-11-088-510/+0
| | | | | | | | | | | | | as lib/libc/tests/stdlib - Make the code a bit more style(9) compliant - Convert a sizeof(x)/sizeof(x[0]) to nitems MFC after: 1 week Sponsored by: EMC / Isilon Storage Division Notes: svn path=/head/; revision=290538
* Integrate tools/regression/lib/libc/stdio into the FreeBSD test suiteEnji Cooper2015-11-0825-2295/+0
| | | | | | | | | | | | | | 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
* Integrate tools/regression/lib/libc/locale into the FreeBSD test suiteEnji Cooper2015-11-0833-2494/+0
| | | | | | | | | | as lib/libc/tests/locale MFC after: 1 week Sponsored by: EMC / Isilon Storage Division Notes: svn path=/head/; revision=290532
* wordexp(): Improve some error codes.Jilles Tjoelker2015-08-191-0/+9
| | | | | | | | | | Distinguish between WRDE_BADVAL and WRDE_SYNTAX based on when the error occurred (parsing or execution), not based on whether WRDE_UNDEF was passed. Also, return WRDE_NOSPACE for a few more unexpected results from sh. Notes: svn path=/head/; revision=286941
* Add a missing break statement, which made the code default to IPv6.Christian Brueffer2015-07-141-0/+1
| | | | | | | | | PR: 201285 Submitted by: David Binderman MFC after: 1 week Notes: svn path=/head/; revision=285543
* Reassign copyright statements on several files from AdvancedJohn Baldwin2015-04-232-2/+2
| | | | | | | | | | Computing Technologies LLC to Hudson River Trading LLC. Approved by: Hudson River Trading LLC (who owns ACT LLC) MFC after: 1 week Notes: svn path=/head/; revision=281887
* wordexp(): Add testcase for non-default IFS in environment.Jilles Tjoelker2015-03-291-0/+15
| | | | | | | | | The non-default IFS is expected to be used. MFC after: 1 week Notes: svn path=/head/; revision=280830
* Garbage collect a prove test wrapperEnji Cooper2015-01-201-15/+0
| | | | | | | | MFC after: 3 days Sponsored by: EMC / Isilon Storage Division Notes: svn path=/projects/building-blocks/; revision=277445
* Convert tools/regression/lib/libc/stdio/test-fpclassify into an ATF testcase andEnji Cooper2014-11-162-77/+1
| | | | | | | | | Rename as lib/libc/stdio/fpclassify2_test Sponsored by: EMC / Isilon Storage Division Notes: svn path=/head/; revision=274595
* Convert tools/regression/lib/libc/stdio/test-fmemopen into an ATF testcase andEnji Cooper2014-11-162-300/+0
| | | | | | | | | rename as lib/libc/stdio/fmemopen2_test Sponsored by: EMC / Isilon Storage Division Notes: svn path=/head/; revision=274592
* Remove test-arc4random from this Makefile so others can continue to useEnji Cooper2014-11-161-1/+1
| | | | | | | this as-is for the time being Notes: svn path=/head/; revision=274582
* Convert tools/regression/lib/libc/gen/test-arc4random into an ATF testcase andEnji Cooper2014-11-161-89/+0
| | | | | | | | | rename as lib/libc/gen/arc4random_test Sponsored by: EMC / Isilon Storage Division Notes: svn path=/head/; revision=274581
* Remove incorrect semicolon.Stefan Farfeleder2014-10-261-1/+1
| | | | Notes: svn path=/head/; revision=273702
* - Use strlen instead of hardcoding a numberPietro Cerutti2014-06-031-2/+2
| | | | | | | | | - Terminate a sentence with a period Approved by: cognet Notes: svn path=/head/; revision=267004
* - Return NULL and set errno to EINVAL if size is 0 (as required by POSIX).Pietro Cerutti2014-06-021-0/+47
| | | | | | | | | | | | | 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 Notes: svn path=/head/; revision=266971
* libc/stdio: Fail fdopen() on an execute-only fd.Jilles Tjoelker2014-04-215-1/+237
| | | | | | | | | | | | 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. Notes: svn path=/head/; revision=264737
* libc: Add fopen() test to regression Makefile.Jilles Tjoelker2014-04-211-3/+11
| | | | Notes: svn path=/head/; revision=264725
* NO_MAN= has been deprecated in favor of MAN= for some time, go aheadWarner Losh2014-04-131-1/+1
| | | | | | | | | and finish the job. ncurses is now the only Makefile in the tree that uses it since it wasn't a simple mechanical change, and will be addressed in a future commit. Notes: svn path=/head/; revision=264400
* Remove broken tests for eui64_line.Julio Merino2014-03-123-92/+1
| | | | | | | | | This function is not public and brooks (initial committer adding the code) suggests the deletion of the tests (which I don't know if they work) instead of changing the visibility of the function. Notes: svn path=/head/; revision=263087
* Make the strerror tests work without libtap.Julio Merino2014-03-122-34/+42
| | | | | | | | | Just replace the simple calls to the library with ad-hoc code. We should later rewrite these with the ATF libraries anyway, which are part of the base system. Notes: svn path=/head/; revision=263085
* libc/stdio: Allow fopen/freopen modes in any order (except initial r/w/a).Jilles Tjoelker2013-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. Notes: svn path=/head/; revision=255303
* libc/stdio: Run mkostemp test using prove.Jilles Tjoelker2013-09-061-0/+10
| | | | Notes: svn path=/head/; revision=255302
* libc/stdio: Provide proper TAP output for fmemopen/open_[w]memstream.Jilles Tjoelker2013-09-063-3/+18
| | | | | | | | A *.t file should provide Test Anything Protocol output so that it can be run using the Perl "prove" tool. Notes: svn path=/head/; revision=255301
* fnmatch(): Add test for r254091 (pattern with single backslash).Jilles Tjoelker2013-08-111-0/+4
| | | | | | | | | | | This test cannot be converted to an sh(1) test because the syntax would be invalid. PR: 181129 MFC after: 1 week Notes: svn path=/head/; revision=254231
* Add mkostemp() and mkostemps().Jilles Tjoelker2013-08-092-3/+167
| | | | | | | | These are like mkstemp() and mkstemps() but allow passing open(2) flags like O_CLOEXEC. Notes: svn path=/head/; revision=254151
* wordexp(): Fix syntax validation for backslashes in single-quotes.Jilles Tjoelker2013-07-231-0/+12
| | | | Notes: svn path=/head/; revision=253581
* Add missing headers.Kevin Lo2013-07-172-0/+3
| | | | Notes: svn path=/head/; revision=253403
* Restore "all rights reserved" (spelled correctly). This was actually part ↵Eitan Adler2013-06-178-0/+8
| | | | | | | | | of the standard text of the license which I did not realize prior. Approved by: bushman Notes: svn path=/head/; revision=251867
* Remove lines declaring "All rights reserved" or similar comments: theyEitan Adler2013-06-169-9/+0
| | | | | | | | | are not true as the files are actually under the BSD-2 license Approved by: bushman Notes: svn path=/head/; revision=251818
* Add libiconv based versions of *c16*() and *c32*().Ed Schouten2013-06-032-0/+75
| | | | | | | | | | | | | | | | I initially thought wchar_t was locale independent, but this seems to be only the case on Linux. This means that we cannot depend on the *wc*() routines to implement *c16*() and *c32*(). Instead, use the Citrus libiconv that is part of libc. I'll see if there is anything I can do to make the existing functions somewhat useful in case the system is built without libiconv in the nearby future. If not, I'll simply remove the broken implementations. Reviewed by: jilles, gabor Notes: svn path=/head/; revision=251314
* Add missing #includes, to keep Clang silent.Ed Schouten2013-05-253-0/+3
| | | | Notes: svn path=/head/; revision=250989
* Add <uchar.h>.Ed Schouten2013-05-213-1/+268
| | | | | | | | | | | | | | | The <uchar.h> header, part of C11, adds a small number of utility functions for 16/32-bit "universal" characters, which may or may not be UTF-16/32. As our wchar_t is already ISO 10646, simply add light-weight wrappers around wcrtomb() and mbrtowc(). While there, also add (non-yet-standard) _l functions, similar to the ones we already have for the other locale-dependent functions. Reviewed by: theraven Notes: svn path=/head/; revision=250883
* popen(): Add 'e' mode character to set close-on-exec on the new fd.Jilles Tjoelker2013-05-201-4/+4
| | | | | | | | | | | | | | | | | If 'e' is used, the kernel must support the recently added pipe2() system call. The use of pipe2() with O_CLOEXEC also fixes race conditions between concurrent popen() calls from different threads, even if the close-on-exec flag on the fd of the returned FILE is later cleared (because popen() closes all file descriptors from earlier popen() calls in the child process). Therefore, this approach should be used in all cases when pipe2() can be assumed present. The old version of popen() rejects "re" and "we" but treats "r+e" like "r+". Notes: svn path=/head/; revision=250827
* Add a test program for popen().Jilles Tjoelker2013-05-202-1/+228
| | | | Notes: svn path=/head/; revision=250825
* wordexp(): Remove wrong IFS usage.Jilles Tjoelker2013-04-011-0/+19
| | | | | | | | | | | | | | Words in shell script are separated by spaces or tabs independent of the value of IFS. The value of IFS is only relevant for the result of substitutions. Therefore, there should be a space between 'wordexp' and the words to be expanded, not an IFS character. Paranoia might dictate that the shell ignore IFS from the environment (even though our sh currently uses it), so do not depend on it in the new test case. Notes: svn path=/head/; revision=248987
* Add an implementation of open_memstream() and open_wmemstream(). TheseJohn Baldwin2013-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 Notes: svn path=/head/; revision=247411
* - Fix more style(9)-related issues (copyright header, spaces after functionPietro Cerutti2013-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 Notes: svn path=/head/; revision=246206
* - Remove underscores from the internal structure name, as it doesn't collidePietro Cerutti2013-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 Notes: svn path=/head/; revision=246148