summaryrefslogtreecommitdiffstats
path: root/tests/stdlib_test.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Add POSIX lcong48.Elliott Hughes2014-11-061-0/+66
| | | | Change-Id: I821046816661d77275cb02c8c99d526bb41afb9c
* make all bionic death tests not dumpableYabin Cui2014-11-061-2/+5
| | | | | | Bug: 18067305 Change-Id: Ia1ecacf47eddecc9bc58aaac779e0c218f463179
* Extra strtod/strtof tests.Elliott Hughes2014-10-281-0/+17
| | | | | | | | Check that libc doesn't suffer from a couple of bugs that affected Java in the past. Bug: 2206701 Change-Id: I9eb64d7ff2fa0b79e93079b897a5fb78bef866be
* Update our FreeBSD realpath(3) to upstream head.Elliott Hughes2014-09-301-0/+12
| | | | Change-Id: I8c89728184ecd2c1a28a05cefa84a5037d28b552
* CLOEXEC support in fdopen, freopen, and mkostemp/mkostemps.Elliott Hughes2014-09-231-5/+19
| | | | Change-Id: I74ea88e0d4973d6ab3c57da7d8bb643c31592b14
* Pull in upstream fixes to reject invalid bases.Elliott Hughes2014-09-231-0/+48
| | | | | | Also add tests to make sure the full set works correctly. Change-Id: I3e7f237f12c9c93e1185a97c9717803e7e55a73c
* Fix linkage of grantpt(3).Elliott Hughes2014-07-251-0/+99
| | | | | | | | Also clean up the implementation of all the pty functions, add tests, and fix the stub implementations of ttyname(3) and ttyname_r(3). Bug: https://code.google.com/p/android/issues/detail?id=58888 Change-Id: I0fb36438cd1abf8d4e87c29415f03db9ba13c3c2
* Implement rand/srand in terms of random/srandom.Elliott Hughes2014-07-141-7/+0
| | | | | | | | Code developed for glibc or older versions of bionic might expect more randomness than the BSD implementation provides. Bug: 15829381 Change-Id: Ia5a908a816e0a5f0639f514107a6384a51ec157e
* Get the full set of PRNG functions in <stdlib.h>Elliott Hughes2014-06-121-12/+19
| | | | | Bug: https://code.google.com/p/android/issues/detail?id=58888 Change-Id: I435250bdae302e8bd7e29977d0fde7b9afbfca5e
* Consistently use #if defined(__BIONIC__) in tests.Elliott Hughes2014-05-131-1/+1
| | | | | | | | I've also switched some tests to be positive rather than negative, because !defined is slightly harder to reason about and there are only two cases: bionic and glibc. Change-Id: I8d3ac40420ca5aead3e88c69cf293f267273c8ef
* Adds quick_exit(3) and at_quick_exit(3) from freebsdDan Albert2014-04-291-0/+46
| | | | Change-Id: I4fe88abd8f7b8aa45e58aeb2529d59a8d555d338
* Implement _Exit(3).Elliott Hughes2014-04-081-0/+14
| | | | Change-Id: Ida6ac844cc87d38c9645b197dd8188bb73e27dbe
* Use the float/double assert macros.Christopher Ferris2014-03-171-4/+4
| | | | | | | | The normal ASSERT_EQ macros don't work quite right for float/double values, and result in false failures. Use the correct macros instead. Bug: 13511379 Change-Id: Ic2feee7f3d3569f57b6453b8fa95222846c625cd
* Ensure we always have symbols for atof, strtof, strtold.Elliott Hughes2014-03-121-0/+16
| | | | | | | | We'll need a better implementation of strtold for LP64, but all our long double functions are currently broken for LP64 anyway so this isn't a regression. Change-Id: I2bdebac11245d31521d5fa09a16331c03dc4339c
* Include what you use.Elliott Hughes2014-03-121-0/+2
| | | | | | Don't rely on transitive includes. (Even though that works fine in AOSP.) Change-Id: Ifc06575e4aea383cfff24d6c5c14fc0a7aabdf2b
* Add a basic unit test for system(3).Elliott Hughes2014-03-111-0/+12
| | | | Change-Id: Ibc5ac21f3663685d89ce261b58d6ea386fc1ff88
* Added mkstemp64Calin Juravle2014-02-241-0/+15
| | | | | Bug: 13076637 Change-Id: I41bf28ab3e6c7325470781e9323eeec023483df5
* Fix pthread_join.Elliott Hughes2013-11-181-0/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | Let the kernel keep pthread_internal_t::tid updated, including across forks and for the main thread. This then lets us fix pthread_join to only return after the thread has really exited. Also fix the thread attributes of the main thread so we don't unmap the main thread's stack (which is really owned by the dynamic linker and contains things like environment variables), which fixes crashes when joining with an exited main thread and also fixes problems reported publicly with accessing environment variables after the main thread exits (for which I've added a new unit test). In passing I also fixed a bug where if the clone(2) inside pthread_create(3) fails, we'd unmap the child's stack and TLS (which contains the mutex) and then try to unlock the mutex. Boom! It wasn't until after I'd uploaded the fix for this that I came across a new public bug reporting this exact failure. Bug: 8206355 Bug: 11693195 Bug: https://code.google.com/p/android/issues/detail?id=57421 Bug: https://code.google.com/p/android/issues/detail?id=62392 Change-Id: I2af9cf6e8ae510a67256ad93cad891794ed0580b
* Switch to current FreeBSD qsort.Elliott Hughes2013-04-111-0/+23
| | | | Change-Id: Ic46cd0b663dc5fa78c99dd38db0bfe849a25e789
* Move realpath.c to upstream-freebsd.Elliott Hughes2013-03-011-0/+39
| | | | | | | | | | This is actually a slightly newer upstream version than the one I originally pulled. Hopefully now it's in upstream-freebsd it will be easier to track upstream, though I still need to sit down and write the necessary scripts at some point. Bug: 5110679 Change-Id: I87e563f0f95aa8e68b45578e2a8f448bbf827a33
* Add basic tests for posix_memalign.Elliott Hughes2013-02-041-0/+13
| | | | Change-Id: Ie34fcc87aa9e8bfc715e25161752024b11e2032a
* Upgrade to the current NetBSD rand implementation.Elliott Hughes2012-10-011-0/+59
Also add basic unit tests. Change-Id: I7fc7ef61d47c1e8fdf8b8eff67a635220c3afd56