summaryrefslogtreecommitdiffstats
path: root/lib/libc
Commit message (Collapse)AuthorAgeFilesLines
...
* MFC r314450,r313439:ngie2017-03-072-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | r314450: Add additional __FreeBSD_version guards around the hsearch_r testcases The reasoning for this is the same as r276046: to ease MFCing the tests to ^/stable/10 . This was accidentally missed in r313439 r313439 | ngie | 2017-02-08 01:46:15 -0800 (Wed, 08 Feb 2017) | 25 lines Merge content from ^/projects/netbsd-tests-upstream-01-2017 into ^/head The primary end-goal of this drop is ease future merges with NetBSD and collaborate further with the NetBSD project. The goal was (largely, not completely as some items are still oustanding in the NetBSD GNATS system) achieved by doing the following: - Pushing as many changes required to port contrib/netbsd-tests back to NetBSD as possible, then pull the upstream applied changes back in to FreeBSD. - Diff reduce with upstream where possible by: -- Improving libnetbsd header, etc compat glue. -- Using _SED variables to modify test scripts on the fly for items that could not be upstreamed to NetBSD. As a bonus for this work, this change also introduces testcases for uniq(1). Many thanks to Christos for working with me to get many of the changes back into the NetBSD project. In collaboration with: Christos Zoulas <christos@netbsd.org>
* MFC r313378,r313379:ngie2017-02-141-10/+12
| | | | | | | | | | | | | | | | | | | | | | | | | r313378: Wrap strcmp/wcscmp calls with ATF_CHECK_MSG and drop atf_tc_fail use 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. r313379: Expect :int_within_limits to fail when ptrdiff_t/*intmax_t differ in base type 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 r313376:ngie2017-02-141-11/+8
| | | | | | | | | | | | | | | | Fix :hexadecimal_floating_point on i386 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 r313174: Clean up documentation of AF_UNIX control messages.jilles2017-02-121-51/+4
| | | | | | | | | | Document AF_UNIX control messages in unix(4) only, not split between unix(4) and recv(2). Also, warn about LOCAL_CREDS effective uid/gid fields, since the write could be from a setuid or setgid program (with the explicit SCM_CREDS and LOCAL_PEERCRED, the credentials are read at such a time that it can be assumed that the process intends for them to be used in this context).
* MFC r311925,r311968,r311969,r312008:ngie2017-02-104-2/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | r311925: Import testcase updates with code contributed back to NetBSD This also (inadvertently) contains an update to contrib/netbsd-tests/lib/libc/sys/t_wait.c (new testcases). In collaboration with: christos@NetBSD.org r311968: Fix lib/libc/sys/access_test after r311925 sys/param.h needs to be #included in order for __FreeBSD_version to be checked r311969: Remove __HAVE_LONG_DOUBLE #define from t_strtod.c and place it in Makefile This is to enable support in other testcases Inspired by lib/msun/tests/Makefile . r312008: Upgrade NetBSD tests to 01.11.2017_23.20 snapshot This contains some new testcases in /usr/tests/...: - .../lib/libc - .../lib/libthr - .../lib/msun - .../sys/kern Tested on: amd64, i386
* MFC r306349:ngie2017-02-101-4/+9
| | | | | | | | | | | r306349 (by pfg): hash(3): protect in-memory page when using cross-endianness. When writing out pages in the "other endian" format, make a copy instead of trashing the in-memory one. Obtained from: NetBSD (CVS rev. 1.29)
* MFC r309373:ngie2017-02-102-0/+117
| | | | | | | | | | r309373 (by bdrewery): Fix setrlimit_test:setrlimit_memlock when the system has exceeded vm.max_wired. This uses the same fix as r294894 did for the mlock test. The code from that commit is moved into a common object file which PROGS supports building first.
* MFC r305358,r305449,r305451,r306367,r306397,r309474:ngie2017-02-107-3/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This also contains a merge of ^/projects/netbsd-tests-update-12@r304035 . This change never hit ^/head because bin/cat's behavior was changed (on ^/head) to match NetBSD. PR: 210607 r305358: Update contrib/netbsd-tests with new content from NetBSD This updates the snapshot from 09/30/2014 to 08/11/2016 This brings in a number of new testcases from upstream, most notably: - bin/cat - lib/libc - lib/msun - lib/libthr - usr.bin/sort lib/libc/tests/stdio/open_memstream_test.c was moved to lib/libc/tests/stdio/open_memstream2_test.c to accomodate the new open_memstream test from NetBSD. Tested on: amd64 (VMware fusion VM; various bare metal platforms); i386 (VMware fusion VM); make tinderbox r305449: Install h_db to unbreak some of the lib/libc/db testcases after r305358 r305451: Fix lib/libc/rpc test assumptions added in r305358 - Require root in the tcp/udp subtests (it's needed on FreeBSD when registering services). - Skip the tests if service registration fails. r306367 (by br): Allow up to 6 arguments only on MIPS. r306397 (by br): Use right piece of code for FreeBSD. r309474: Don't build :strvis_locale if VIS_NOLOCALE is undefined The copy of contrib/libc-vis on ^/stable/10 doesn't contain all of the features in the ^/stable/11 // ^/head version, including VIS_NOLOCALE. The risk is lower in conditionally running the test instead of backporting the newer version of libc-vis
* MFC r296586:ngie2017-02-091-0/+1
| | | | | | r296586 (by bdrewery): Fix and connect setjmp test.
* MFC r289172,r290254:ngie2017-02-0925-60/+7
| | | | | | | | | | | | | | | | r289172: Refactor the test/ Makefiles after recent changes to bsd.test.mk (r289158) and 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 r290254: Remove unused variable (SRCDIR)
* MFC r276527:ngie2017-02-091-0/+4
| | | | | | | | | | | Don't install h_raw if dealing with clang 3.5.0+ to unbreak the tests2 Jenkins job The h_raw application doesn't do proper bounds checking without the option being supplied via the build, which means that it doesn't throw signals and fail as expected PR: 196430
* MFC r277648:ngie2017-02-091-1/+2
| | | | | | | | r277648 (by jilles): Enable utimensat tests from NetBSD. As with other tests from c063, a required #include <sys/stat.h> was missing.
* MFC r283584:ngie2017-02-092-11/+17
| | | | | | | | | | | | | | Relnotes: yes r283584 (by emaste): memmem(3): empty little string matches the beginning of the big string This function originated in glibc, and this matches their behaviour (and NetBSD, OpenBSD, and musl). An empty big string (arg "l") is handled by the existing l_len < s_len test.
* MFC r279154,r279397:ngie2017-02-092-9/+43
| | | | | | | | | | | | | | | | | | | | | | r279154 (by jilles): nice(): Correct return value and [EPERM] error. PR: 189821 Obtained from: NetBSD Relnotes: yes r279397 (by jilles): nice(): Put back old return value, keeping [EPERM] error. Commit r279154 changed the API and ABI significantly, and {NZERO} is still wrong. Also, preserve errno on success instead of setting it to 0. PR: 189821 Relnotes: yes
* MFC r312332:ngie2017-02-041-1/+1
| | | | | Use SRCTOP where possible and use :H to manipulate .CURDIR to get rid of unnecessarily long relative path .PATH values with make
* MFC r311651:kib2017-01-215-106/+164
| | | | Export __cxa_thread_atexit_impl as an alias for __cxa_thread_atexit.
* MFC r310984,r311102:ngie2017-01-091-8/+4
| | | | | | | | | | r310984: Use calloc instead of malloc + memset(.., 0, ..) r311102 (by pfg): Cleanup inelegant calloc(3) introduced in r310984.
* MFC r309650:ed2016-12-202-2/+9
| | | | | | | | | Properly sign extend the result of jrand48() and mrand48(). These functions are supposed to return a value between [-2^31, 2^31). This doesn't seem to work on 64-bit systems, where we return a value between [0, 3^32). Patch up the function to use proper casts to int32_t. While there, fix some other style bugs.
* Merge rr309688: address regressions in SA-16:37.libc.glebius2016-12-071-6/+5
| | | | | PR: 215105 Submitted by: <jtd2004a sbcglobal.net>
* Merge r309639 from head:glebius2016-12-061-17/+34
| | | | | | | | | | | Fix possible buffer overflow(s) in link_ntoa(3). A specially crafted sockaddr_dl argument can trigger a static buffer overflow in the libc library, with possibility to rewrite with arbitrary data following static buffers that belong to other library functions. Reviewed by: kib Security: FreeBSD-SA-16:37.libc
* MFstable/11 r309600:ngie2016-12-061-2/+2
| | | | | | | MFC r307220: r307220 (by br): Fix typos: use correct string format and value to compare.
* MFC r309026: open(2): Clarify non-POSIX error when opening a symlink withjilles2016-12-041-1/+17
| | | | | | | | | | O_NOFOLLOW. We return [EMLINK] instead of [ELOOP] when trying to open a symlink with O_NOFOLLOW, so that the original case of [ELOOP] can be distinguished. Code like cmp -h and xz takes advantage of this. PR: 214633
* MFC r264196:ngie2016-12-032-2/+5
| | | | | | | r264196 (by theraven): Move definitions out of rpc_com so that the linker doesn't complain about multiple definitions.
* MFC r296133:ngie2016-12-032-3/+3
| | | | | | | | | | | r296133 (by pfg): RPC: update the getrpcbyname() definition to include a const qualifier. Add const qualifier making getrpcbyname() and getrpcbyname_r() prototypes match those used in latest Sun RPC code (TI-RPC 2.3). Obtained from: NetBSD
* MFC r301734:ngie2016-12-031-1/+1
| | | | | | r301734 (by kevlo): Fix the rpcb_getaddr() definition to match its declaration.
* MFC r296404:ngie2016-12-031-8/+8
| | | | | | | | r296404 (by pfg): Stray tabs and spaces. No functional change.
* MFC r287353:ngie2016-12-031-1/+1
| | | | | | | | r287353 (by rodrigc): Use unsigned variable. Eliminates gcc 4.9 compiler warning.
* MFC r296386:ngie2016-12-031-16/+20
| | | | | | | | | | | r296386 (by pfg): Work around aliasing issues detected in modern GCC. Avoid casting gymnastics that lead to pointer aliasing by introducing an inline function as done in NetBSD (but without #if0'd WIP code). Obtained from: NetBSD (CVS Rev. 1.24, 1.25)
* MFC r278039:ngie2016-12-031-0/+1
| | | | | | | | r278039 (by pfg): Resource leak CID: 1016703
* MFC r288017:ngie2016-12-031-69/+31
| | | | | | | | r288017 (by rodrigc): Use ANSI C prototypes. Eliminates gcc 4.9 warnings.
* MFC r288995:ngie2016-12-032-4/+4
| | | | | | | r288995 (by rodrigc): Use proper function prototypes. Eliminates -Wstrict-prototypes warning
* MFC r287347:ngie2016-12-031-21/+7
| | | | | | | | r287347 (by rodrigc): Use ANSI C prototypes. Eliminates gcc 4.9 warnings.
* MFC r301754,r301769:ngie2016-12-034-26/+26
| | | | | | | | | | | | | | | | | | r301754 (by pfg): libc/rpc: Make use of some xdr_* macros. xdr_rpcprog and xdr_rpcvers were broken in older versions of FreeBSD but were fixed in r296394. Give them some use hoping they help make the code somewhat more readable. r301769 (by pfg): libc/rpc: Make use of some xdr_* macros. (part 2) xdr_rpcproc, xdr_rpcprog and xdr_rpcvers were broken in older versions of FreeBSD but fixed in r296394. Give them some use hoping they help make the code somewhat more readable.
* MFC r278041:ngie2016-12-031-1/+1
| | | | | | | | | | | | r278041 (by pfg): rpc: Uninitialized pointer read Initialize *xprt to avoid exposing a random value in cleanup_svc_vc_create. CID: 1018723 Phabric: D1749
* MFC r287341,r287342,r287348:ngie2016-12-0316-399/+184
| | | | | | | | | | | | | | | | | | r287341 (by rodrigc): Use ANSI C prototypes. Eliminates gcc 4.9 warnings. r287342 (by rodrigc): Mark unused parameters to reduce gcc 4.9 warnings. r287348 (by rodrigc): Use correct function prototype for signal handler. Eliminates gcc 4.9 warning.
* MFC r288113:ngie2016-12-0335-409/+235
| | | | | | r288113 (by rodrigc): Use ANSI C prototypes. Eliminates -Wold-style-definition warnings.
* MFC r297790:ngie2016-12-0322-52/+49
| | | | | | | | | | | r297790 (by pfg): libc: replace 0 with NULL for pointers. While here also cleanup some surrounding code; particularly drop some malloc() casts. Found with devel/coccinelle.
* MFC r287350:ngie2016-12-035-12/+12
| | | | | | | | r287350 (by rodrigc): Use ANSI C prototypes. Eliminates gcc 4.9 warnings.
* MFC r299704:ngie2016-12-034-6/+83
| | | | | | | | | | | | | | | | r299704 (by vangyzen): iconvctl(3): remove superfluous NULL pointer tests convname and dst are guaranteed to be non-NULL by iconv_open(3). src is an array. Remove these tests for NULL pointers. While I'm here, eliminate a strlcpy with a correct but suspicious-looking calculation for the third parameter (i.e. not a simple sizeof). Compare the strings in-place instead of copying. Found by: bdrewery Found by: Coverity CID: 1130050, 1130056
* MFstable/11 r309453:ngie2016-12-031-0/+4
| | | | | | MFC r307700: Only build lib/libc/tests/iconv if MK_ICONV != no
* MFC r308904vangyzen2016-11-303-15/+31
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix error reporting from wcstof() When wcstof() skipped initial space and then parsing failed, it set endptr to the first non-space character. Fix it to correctly report failure by setting endptr to the beginning of the input string. The fix is from theraven@, who fixed this bug in wcstod() and wcstold() in r227753. While I'm here: Move assignments out of declarations in wcstod() and wcstold(). This is against my personal preference, but it is our agreed style(9). Set endptr correctly on malloc() failure in all three functions. Remove an incorrect comment: This is pointer arithmetic, so the code was not actually making that assumption. wcstold() advanced the wcp pointer beyond leading whitespace and then reset it back to the beginning of the string. Do not reset it. This seems to have no functional effect, since strtold_l() also skips leading whitespace. I'm making the change to keep this function consistent with wcstof() and wcstod(), and because the C11 spec prescribes the use of iswspace() to skip leading space. Reported by: libc++ unit test for std::stof(std::wstring) Sponsored by: Dell EMC
* MFC 308056: Fix formatting of tables.jhb2016-11-231-123/+123
| | | | | | | | | | | Specifically, use .Ta instead of tabs to separate column entries. While here fix a few other things: - Use .Sy for all column headers (previously only the first column header was bold) - Use .Dv to markup constants used for MIB names. - Use "1234" and "4321" for the byte order descriptions without thousands separators. - Mark up header files in the first table with .In.
* MFstable/11 r307718:ngie2016-10-212-4/+4
| | | | | | | | | MFC r305920: Remove spurious newlines from atf_tc_fail calls This changes the results from broken (incorrect) to failed (correct) on i386
* MFC r306332:pfg2016-10-191-1/+2
| | | | | | btree(3): don't shortcut closing if the metadata is dirty. Obtained from: NetBSD (from krb5 tree)
* MFC r305628: intro(2),_exit(2): Update for reaperjilles2016-10-122-5/+10
| | | | (procctl(PROC_REAP_ACQUIRE)).
* MFC r306334:kib2016-10-033-0/+244
| | | | | | | Document thr_suspend(2) and thr_wake(2). MFC r306506: Reword the statement.
* MFC r306075,r306109ache2016-09-281-14/+32
| | | | | | | | | | | | | | | | | | 1) Microoptimize %p case. 2) Implememt %u for GNU compatibility. 3) Don't forget to advance buf for %w/%u. 4) Fail with incomplete week (week 0) request and no such week in the year. 5) Fix yday formula when Sunday requested and the week started from Monday. 6) Fail with impossible yday for incomplete week (week 0) and direct %w/%u request. 7) Shift yday/wday to the first day of the year, if incomplete week (week 0) requested and no %w/%u used. 8) For already non-standard %z extension implement GNU compatible formats: +hh and -hh. 9) Check for incorrect values for %z. PR: 212983 (case 3 only)
* MFC r274925: misc mdoc fixes.pluknet2016-09-271-1/+0
|
* MFC r305956: Add manpage for rctl_* system callsbadger2016-09-242-0/+225
| | | | | Approved by: kib (mentor) Sponsored by: Dell Technologies
* MFC r303889:pfg2016-09-081-1/+1
| | | | | | | | libc/rpc: replace comma with semicolon when pertinent. Uses of commas instead of a semicolons can easily go undetected. The comma can serve as a statement separator but this shouldn't be abused when statements are meant to be standalone.
OpenPOWER on IntegriCloud