summaryrefslogtreecommitdiffstats
path: root/contrib/netbsd-tests/lib/libc/gen
Commit message (Collapse)AuthorAgeFilesLines
* MFC r318315:ngie2017-05-291-0/+10
| | | | | | | lib/libc/gen/realpath_test: make check result from getcwd(3) This is being done to avoid dereferencing a NULL pointer via strlcat, obscuring the underlying issue with the getcwd(3) call.
* MFC r313439,r314450:ngie2017-03-075-21/+96
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | r313439: 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> 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
* MFC r313377:ngie2017-02-141-0/+5
| | | | | | | Expect :floatunditf to fail on FreeBSD/i386 The precision error on FreeBSD/i386 doesn't match the expected output in long double form.
* MFC r312008:ngie2017-02-122-17/+24
| | | | | | | | | | | | | 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 r311925,r311968,r311969,r312102,r312108:ngie2017-02-0410-76/+40
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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 . r312102: Note that sys/types.h is required on FreeBSD for kqueue(2), unlike NetBSD r312108: Delete trailing whitespace and use __arraycount instead of nitems in contrib code
* MFC r311924:ngie2017-01-142-2/+2
| | | | Fix whitespace in comment
* MFC r311227,r311917:ngie2017-01-141-0/+31
| | | | | | | | | | | | | | | | | | | | | | r311227: seekdir_basic: fix various Coverity issues Address.. - .. resource leaks of file descriptors and memory - .. unchecked return values from creat(2), mkdir(2), and telldir(3) - .. potential NULL derefs after calling readdir(3) CID: 975255, 975256, 976989, 978989, 978990 r311917: Fix up r311227 Check for creat returning a value != -1, not a non-zero value Pointyhat to: ngie CID: 1368366
* MFC r311870:ngie2017-01-131-3/+3
| | | | Merge the grammar fix for lib/libc/gen/raise_test:raise_stress
* MFC r311235:ngie2017-01-071-0/+3
| | | | | | ttyname_err: close fd if it was opened successfully CID: 978292
* MFC r311228:ngie2017-01-071-0/+3
| | | | | | ftok_link: don't leak fd CID: 978291
* MFC r311229:ngie2017-01-071-0/+3
| | | | | | humanize_number_basic: don't leak buf CID: 1251407
* MFC r309474:ngie2016-12-031-0/+12
| | | | | | | | | 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 r305358:ngie2016-12-0310-37/+152
| | | | | | | | | | | | | | | | | | | | | 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
* Remove legacy brk and sbrk from RISC-V.br2016-05-251-2/+3
| | | | | | Discussed with: andrew Sponsored by: DARPA, AFRL Sponsored by: HEIF5
* Remove brk and sbrk from arm64. They were defined in The Single UNIXandrew2016-05-201-0/+4
| | | | | | | | | | | | | | | | | | | | | Specification, Version 2, but marked as legacy, and have been removed from later specifications. After 12 years it is time to remove them from new architectures when the main use for sbrk is an invalid method to attempt to find how much memory has been allocated from malloc. There are a few places in the tree that still call sbrk, however they are not used on arm64. They will need to be fixed to cross build from arm64, but these will be fixed in a follow up commit. Old copies of binutils from ports called into sbrk, however this has been fixed around 6 weeks ago. It is advised to update binutils on arm64 before installing a world that includes this change. Reviewed by: brooks, emaste Obtained from: brooks Relnotes: yes Sponsored by: ABT Systems Ltd Differential Revision: https://reviews.freebsd.org/D6464
* Don't dump core files with lib/libc/ssp/ssp_test and lib/libc/gen/assert_testngie2015-12-221-0/+23
| | | | | | | | | | | | | The default `sysctl kern.corefile` value is compatible with `kyua test` (FreeBSD will dump to the current directory). If it's set to an absolute path however, `kyua test` will not be able to clean up the corefiles after the fact The corefiles have little value when testing the behavior of feature behavior, so just disable corefile generation MFC after: 1 week Obtained from: Isilon OneFS (^/onefs/head@r511419) Sponsored by: EMC / Isilon Storage Division
* Fix -Wunused warnings with variables used unlit code by adding appropriate ↵ngie2015-11-151-0/+2
| | | | | | | | | #ifdef guards around the variables MFC after: 3 days Sponsored by: EMC / Isilon Storage Division
* Fix t_spawnattr test for attributes handling by posix_spawn(3).kib2015-09-011-27/+32
| | | | | | | | | | | | | | | | | | | | | Connect it to the build. The code assumed that SCHED_* constants form a contiguous set of numbers, remove the assumption by using schedulers[] array in get_different_scheduler(). This is no-op on FreeBSD, but improves code portability. The selection of different priority used the min/max priority range of the current scheduler class, instead of the priority to be changed to. The bug caused the test failure. Remove duplication of POSIX_SPAWN_SETSIGDEF flag and now unused duplications of MIN/MAX definitions. Reviewed by: jilles, pho Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D3533
* nice(): Put back old return value, keeping [EPERM] error.jilles2015-02-281-0/+23
| | | | | | | | | | | 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 Reported by: bde Relnotes: yes
* nice(): Correct return value and [EPERM] error.jilles2015-02-221-28/+0
| | | | | | PR: 189821 Obtained from: NetBSD Relnotes: yes
* ttyname_r(): Return actual error, not always [ENOTTY].jilles2015-02-011-3/+0
| | | | | | | Adjust the test that used to fail because of this bug. PR: 191936 MFC after: 1 week
* Mechanically replace #if defined(__FreeBSD__) and #if defined(__NetBSD__) withngie2014-11-1710-25/+25
| | | | | | | | | their #ifdef equivalents for everything changed in contrib/netbsd-tests. There are some items from the vendor tree that use #if defined(__FreeBSD__) or #if defined(__NetBSD__) which are being left alone Requested by: bde, rpaulo Sponsored by: EMC / Isilon Storage Division
* Import proper fix for misc/49356 (/usr/include/atf-c/config.h) after ↵ngie2014-11-044-8/+4
| | | | | | | | atf-c/config.h was removed from the build Pointyhat to: me (again, for not running make delete-old after running test builds)
* Skip :sethostname_basic because it messes up the test host's hostnamengie2014-11-011-2/+4
| | | | Convert code from #if defined(__FreeBSD__) to #ifdef __FreeBSD__
* - Omit the poll testcases on FreeBSD (they require pollts)ngie2014-10-231-0/+13
| | | | | | - Add necessary headers for the testcases Sponsored by: EMC / Isilon Storage Division
* Port lib/libc/gen/t_siginfo to FreeBSDngie2014-10-211-0/+6
| | | | | | | | | | | - mcontext_t on FreeBSD doesn't have a __gregs field (it's split out on FreeBSD into separate fields). In order to avoid muddying the test code with MD code, the debugging trace info has not been implemented - FreeBSD does not implement the si_stime and si_utime fields in siginfo_t, so omit the debugging code that dumps the values - sys/inttypes.h doesn't exist on FreeBSD Sponsored by: EMC / Isilon Storage Division
* Expect nice_err to fail on FreeBSD with unprivileged usersngie2014-10-121-0/+5
| | | | | PR: 189821 Sponsored by: EMC / Isilon Storage Division
* Port the testcase to FreeBSDngie2014-10-101-0/+14
| | | | | | | | | | - Make #include path to h_macros.h a non-relative path - __gl_stat_t is synonymous with struct stat on FreeBSD - FreeBSD doesn't have _DIRENT_RECLEN - Skip over glob_star on FreeBSD (testcase doesn't pass) In collaboration with: pho Sponsored by: EMC / Isilon Storage Division
* Skip over t_spawn_open_nonexistent_diag because it requires NetBSD specificngie2014-10-101-0/+7
| | | | | | additions to posix_spawn Sponsored by: EMC / Isilon Storage Division
* SIGPWR does not exist on FreeBSDngie2014-10-101-0/+4
| | | | Sponsored by: EMC / Isilon Storage Division
* Handle getting/setting niceness/priority correctly on FreeBSD vs NetBSDngie2014-10-101-0/+23
| | | | | | | This might be fallout from PR: 189821 Submitted by: pho Sponsored by: EMC / Isilon Storage Division
* Disable the invalid pointer test on FreeBSDngie2014-10-101-0/+2
| | | | | | | | | FreeBSD segfaults on invalid pointers passed to getcwd because it throbs the address passed in in libc, whereas NetBSD just passes the information off to the syscall, which allows the kernel to return EFAULT on bad pointers. In collaboration with: pho Sponsored by: EMC / Isilon Storage Division
* FreeBSD doesn't support strings greater than MAXHOSTNAMELEN-1 inngie2014-10-102-0/+32
| | | | | | | | | | | | {get,set}{domain,host}name. Adjust the tests to not exceed that value when testing out the code Add a positive and negative test for MAXHOSTNAMELEN-1 and MAXHOSTNAMELEN, respectively PR: 181127 In collaboration with: pho Sponsored by: EMC / Isilon Storage Division
* FreeBSD returns ENOTTY instead of EBADF in ttyname_r; mark it as an expectedngie2014-10-101-0/+3
| | | | | | | | | failure PR: 191936 In collaboration with: pho Sponsored by: EMC / Isilon Storage Division
* Add missing #include <sys/time.h> for gettimeofdayngie2014-10-101-0/+3
| | | | Sponsored by: EMC / Isilon Storage Division
* Disable tests that don't pass on FreeBSD due to missing support inngie2014-10-101-0/+6
| | | | | | | | | | humanize_number(3). Bringing in additional revisions from NetBSD's humanize_number(3) will fix the tests Account for the fact that util.h on NetBSD is libutil.h on FreeBSD Submitted by: pho Sponsored by: EMC / Isilon Storage Division
* Import the NetBSD test suite from ^/vendor/NetBSD/tests/09.30.2014_20.45 ,ngie2014-10-0240-0/+6635
minus the vendor Makefiles Provide directions for how to bootstrap the vendor sources in FREEBSD-upgrade MFC after 2 weeks Discussed with: rpaulo Sponsored by: EMC / Isilon Storage Division
OpenPOWER on IntegriCloud