summaryrefslogtreecommitdiffstats
path: root/tests
Commit message (Collapse)AuthorAgeFilesLines
* Add missing file from previous change.Elliott Hughes2014-02-181-0/+61
| | | | Change-Id: Id25000162a9ed76ce756842bdc09fe9afff9528f
* Implement some of the missing LFS64 support.Elliott Hughes2014-02-185-22/+125
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This gives us: * <dirent.h> struct dirent64 readdir64, readdir64_r, alphasort64, scandir64 * <fcntl.h> creat64, openat64, open64. * <sys/stat.h> struct stat64 fstat64, fstatat64, lstat64, stat64. * <sys/statvfs.h> struct statvfs64 statvfs64, fstatvfs64. * <sys/vfs.h> struct statfs64 statfs64, fstatfs64. This also removes some of the incorrect #define hacks we've had in the past (for stat64, for example, which we promised to clean up way back in bug 8472078). Bug: 11865851 Bug: 8472078 Change-Id: Ia46443521918519f2dfa64d4621027dfd13ac566
* Fix x86 build.Elliott Hughes2014-02-181-0/+1
| | | | Change-Id: Iee6e5884288f7da6c955694cfe32fecfd9c9e263
* bionic: fix __set_errno for arm64 syscalls that return a 64-bit valueColin Cross2014-02-181-0/+23
| | | | | | | | | | | | | | | | bionic/libc/arch-arm64/syscalls/read.S ends with: b.hi __set_errno ret END(read) If __set_errno returns int, it will set w0 to 0xFFFFFFFF, which means x0 is 0x00000000FFFFFFFF. When interpreted as a ssize_t that is INT_MAX, not -1. Change __set_errno to return long, which will cause x0 to be set instead of w0. Change-Id: I9f9ea0f2995928d2ea240eb2ff7758ecdf0ff412
* Restore sys_signame for LP64.Elliott Hughes2014-02-121-1/+1
| | | | | | mksh is using this, and we probably build as much BSD source as glibc source. Change-Id: I400d255a67f9614ca9e57090e3a2e49d2b10cba4
* Clean up sys_signame and sys_siglist a little.Elliott Hughes2014-02-121-0/+14
| | | | | | | | | | We don't need quite so much duplication because we already have a way to get the signal number from its name, and that already copes with the fact that the mips/mips64 numbers are different from everyone else's. Also remove sys_signame from LP64. glibc doesn't have this BSD-ism. Change-Id: I6dc411a3d73589383c85d3b07d9d648311492a10
* Make sure that the same tests are on all platforms.Christopher Ferris2014-02-0620-302/+614
| | | | | | | | | | | | | | | | In order to be able to generate a list of tests for cts, the same set of tests must exist across all platforms. This CL adds empty tests where a test was conditionally compiled out. This CL creates a single library libBionicTests that includes all of the tests found in bionic-unit-tests-static. Also fix a few missing include files in some test files. Tested by running and compiling the tests for every platform and verifying the same number of tests are on each platform. Change-Id: I9989d4bfebb0f9c409a0ce7e87169299eac605a2
* Add fallocate/fallocate64/posix_fallocate/posix_fallocate64.Elliott Hughes2014-02-031-0/+49
| | | | | | Bug: 5287571 Bug: 12612860 Change-Id: I4501b9c6cdf9a830336ce0b3afc4ea716b6a0f6f
* Fix pthread_test to work with gtest 1.7.0.Elliott Hughes2014-01-281-3/+7
| | | | | | | Now we're building it correctly configured, gtest takes a couple of TLS slots for itself. Change-Id: I1c2c4e9e5f9c6e2e2e6ecd1214cfc16a5af5afed
* Fix 32-bit mmap/mmap64 handling of negative offsets.Elliott Hughes2014-01-272-0/+31
| | | | | | | | | | We don't actually need to worry about sign extension if we reject negative values ourselves. Previously it was possible to come up with negative but aligned values that we would pass to the kernel; in the case of mmap (as opposed to mmap64) we'd incorrectly turn those into large positive offsets. Change-Id: I2aa583e0f892d59bb77429aea8730b72db32dcb0
* Remove __STDC_FORMAT_MACROS and __STDC_LIMIT_MACROS guards (and fix SIZE_MAX ↵Elliott Hughes2014-01-241-2/+0
| | | | | | | | | | for LP64). The various committees decided that everyone should get all these macros, all the time. Bug: 12708004 Change-Id: Ib56010dcba9b0656e5701546fefb7f78dc0bf916
* bionic: rename aarch64 target to arm64Colin Cross2014-01-231-2/+2
| | | | | | | Rename aarch64 build targets to arm64. The gcc toolchain is still aarch64. Change-Id: Ia92d8a50824e5329cf00fd6f4f92eae112b7f3a3
* Fix <sys/resource.h>.Elliott Hughes2014-01-092-0/+88
| | | | | | | | | | | | | | | | | | The situation here is a bit confusing. On 64-bit, rlimit and rlimit64 are the same, and so getrlimit/getrlimit64, setrlimit/setrlimit64, and prlimit/prlimit64 are all the same. On 32-bit, rlimit and rlimit64 are different. 32-bit architectures other than MIPS go one step further by having an even more limited getrlimit system call, so arm and x86 need to use ugetrlimit instead of getrlimit. Worse, the 32-bit architectures don't have 64-bit getrlimit- and setrlimit-equivalent system calls, and you have to use prlimit64 instead. There's no 32-bit prlimit system call, so there's no easy implementation of that --- what should we do if the result of prlimit64 won't fit in a struct rlimit? Since 32-bit survived without prlimit/prlimit64 for this long, I'm not going to bother implementing prlimit for 32-bit. We need the rlimit64 functions to be able to build strace 4.8 out of the box. Change-Id: I1903d913b23016a2fc3b9f452885ac730d71e001
* Merge "Pass a valid stack pointer to __bionic_clone in pthread.__bionic_clone"Elliott Hughes2014-01-061-1/+1
|\
| * Pass a valid stack pointer to __bionic_clone in pthread.__bionic_cloneChris Dearman2014-01-041-1/+1
| | | | | | | | | | | | | | | | | | __bionic_clone modifies the child stack before cloning so the stack pointer should be valid. The test is expecting an EINVAL error to be generated from the incorrect flags: CLONE_THREAD set without CLONE_SIGHAND. Change-Id: Ic02192081f6f52df6f03d9810efa82d923247a11
* | Fix dev_t (for LP64).Elliott Hughes2014-01-032-0/+44
|/ | | | | | | | 32-bit Android's dev_t was wrong too. We can't fix that without ABI breakage, but we can at least fix 64-bit Android. And add tests. Bug: https://code.google.com/p/android/issues/detail?id=54966 Change-Id: Ie2e42cc042b78b669a1a44e55f959dbd9c52c5c9
* Don't abort in stdio.getdelim_invalid and stdio.getline_invalid.Elliott Hughes2013-12-191-0/+2
| | | | Change-Id: Ie1aefed732f4bea77887bddd1be9a0578e247aa3
* Fix compilation of crtbegin.c and pthread_debug.cpp.Elliott Hughes2013-12-181-1/+1
| | | | | | | | | | | | | | | | | Because there was no default := for the aarch64 libc_crt_target_cflags, the += was causing libc_crt_target_cflags to be recursively-defined variable, which meant that when we were compiling crtbegin.c LOCAL_PATH would be bionic/tests/ and we'd have -Ibionic/tests/include/ and find none of our include files. Also fix linking of pthread_debug.cpp, at least in the disabled mode. The enabled mode was already broken for all architectures, and continues to be broken after this change. It's been broken for long enough that we might want to just remove it... (aarch64 is using the FSF linker where arm uses the gold linker.) Change-Id: I7db2e386694f6933db043138e6e97e5ae54d4174
* AArch64: Linker64 support for AArch64Marcus Oakland2013-12-171-3/+0
| | | | | | | Addition of support for AArch64 in the linker64 target. Change-Id: I8dfd9711278f6706063e91f626b6007ea7a3dd6e Signed-off-by: Marcus Oakland <marcus.oakland@arm.com>
* AArch64: Add fixes to bionic/testsSerban Constantinescu2013-12-161-0/+8
| | | | | | | This patch adds minor fixes to the bionic unit tests. Change-Id: Ie10f33c631ed6c10987923d678711d22931ddb05 Signed-off-by: Serban Constantinescu <serban.constantinescu@arm.com>
* PTHREAD_KEYS_MAX cleanup.Elliott Hughes2013-12-121-0/+5
| | | | | | | | I fixed this bug a while back, but didn't remove it from the list, could have added a better test, and could have written clearer code that didn't require a comment. Change-Id: Iebdf0f9a54537a7d5cbca254a5967b1543061f3d
* Merge "bionic: move benchmarks out of tests directory"Colin Cross2013-12-117-667/+0
|\
| * bionic: move benchmarks out of tests directoryColin Cross2013-12-107-667/+0
| | | | | | | | Change-Id: I4d054965198af22c9a9c821d1bc53f4e9ea01248
* | Add strcmp/memcmp testing.Christopher Ferris2013-12-033-8/+209
| | | | | | | | | | Bug: 9797008 Change-Id: I11b1da060d29f7dacbb53f20a3e2082395b5bd8a
* | Merge commit '811b0cdb2d6e4a697dbc63a678712759dd0db242' into HEADThe Android Open Source Project2013-11-221-0/+78
|\ \ | | | | | | | | | Change-Id: I786944f80fb1a2d502fed51dc2c391ed5db66761
| * \ am d6e117b6: am 1f29c2f5: Merge "Switch sigpending over to rt_sigpending."Elliott Hughes2013-10-161-17/+41
| |\ \ | | | | | | | | | | | | | | | | * commit 'd6e117b64bdfbf8d793eb59ea9604b806608ec75': Switch sigpending over to rt_sigpending.
| * \ \ am 87fc78de: am 608c65f6: Merge "Fix sigsuspend to use rt_sigsuspend on all ↵Elliott Hughes2013-10-151-0/+33
| |\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | platforms." * commit '87fc78de6c869d0403ccdd2e756ec1f5d456f3d3': Fix sigsuspend to use rt_sigsuspend on all platforms.
| * \ \ \ am 5b3f1d8b: am 22b83da4: Merge "Clean up the sigprocmask/pthread_sigmask ↵Elliott Hughes2013-10-151-0/+19
| |\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | implementation." * commit '5b3f1d8b3a6a1caf059dc376e4967a27ddd57dac': Clean up the sigprocmask/pthread_sigmask implementation.
| * \ \ \ \ am 4691325d: am abeafbd6: Merge "Wrap sprintf()/snprintf() macros to prevent ↵Stephen Hines2013-10-111-0/+18
| |\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | expansion errors." * commit '4691325d48406033632fe84a944ac9c3bd2e5097': Wrap sprintf()/snprintf() macros to prevent expansion errors.
| * \ \ \ \ \ am 36959302: am 8704ada3: Merge "Fix clang warnings in bionic."Stephen Hines2013-10-113-6/+6
| |\ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * commit '36959302a334499c7d2ddf4a090e2ab7e3a8ae1d': Fix clang warnings in bionic.
| * \ \ \ \ \ \ am 95de0df8: am eda2679e: Merge "FORTIFY_SOURCE: fortify read()"Nick Kralevich2013-10-091-0/+10
| |\ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * commit '95de0df8c2daeefca358010f2d15c3346a5284f1': FORTIFY_SOURCE: fortify read()
| * \ \ \ \ \ \ \ am b35ebe3d: am 848efa9d: Merge "Revert "FORTIFY_SOURCE: fortify read()""Nick Kralevich2013-10-091-10/+0
| |\ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * commit 'b35ebe3d7097899fd4498ebb2b93e48fd836ebcf': Revert "FORTIFY_SOURCE: fortify read()"
| * \ \ \ \ \ \ \ \ am 731ced6b: am c147478c: Merge "FORTIFY_SOURCE: fortify read()"Nick Kralevich2013-10-091-0/+10
| |\ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * commit '731ced6b289629a552b5841561fdcccf08d8c43a': FORTIFY_SOURCE: fortify read()
| * \ \ \ \ \ \ \ \ \ am 2e819c58: am 2ff3c746: Merge "Check memory size on FD_* functions"Nick Kralevich2013-10-031-0/+14
| |\ \ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * commit '2e819c58c9396eec3e4311ef2c9bdcadd107f001': Check memory size on FD_* functions
| * \ \ \ \ \ \ \ \ \ \ am 2a3d760e: am 00a816e5: Merge "Fix 32-bit issues in tests, and add a ↵Elliott Hughes2013-10-024-5/+50
| |\ \ \ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | trivial test for the FD_* macros." * commit '2a3d760e0fc0cbd2cac03754949457c062ced5f5': Fix 32-bit issues in tests, and add a trivial test for the FD_* macros.
| * \ \ \ \ \ \ \ \ \ \ \ am 8598cd68: am f741e1c2: Merge "FORTIFY_SOURCE: Add __FD_* checks"Nick Kralevich2013-10-021-0/+7
| |\ \ \ \ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * commit '8598cd6888366008033286113bd633b44c70b7dd': FORTIFY_SOURCE: Add __FD_* checks
| * \ \ \ \ \ \ \ \ \ \ \ \ am f7da611b: am 00d51c9f: Merge "Use alloc_size attribute on *alloc functions"Nick Kralevich2013-10-021-0/+14
| |\ \ \ \ \ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * commit 'f7da611b3dedaf9951e08b0296daf67eda8228c0': Use alloc_size attribute on *alloc functions
| * \ \ \ \ \ \ \ \ \ \ \ \ \ am 34c2a9fc: Move stack unwinding test into library.Christopher Ferris2013-09-301-1/+1
| |\ \ \ \ \ \ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * commit '34c2a9fc37848d446bf91ce61783884232fffeb1': Move stack unwinding test into library.
| | * | | | | | | | | | | | | | Move stack unwinding test into library.Christopher Ferris2013-09-231-4/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Bug: 8291716 (cherry picked from commit 8240bed918722944c9985bc0cca89eb44c4f6c91) Change-Id: I1da2d0757ed304c352229f9818c052925d4e976a
| * | | | | | | | | | | | | | | Fix line that got removed by merge.Christopher Ferris2013-09-291-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (cherry picked from commit f14d71fcf74e755ece4f8ca2ca2b7483424aa432) Change-Id: Id3dd54d9efd87ef2bbb2c90adae2ce3911695027
| * | | | | | | | | | | | | | | resolved conflicts for merge of f4af9110 to klp-dev-plus-aospConley Owens2013-09-271-2/+1
| |\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ | | |/ / / / / / / / / / / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Change-Id: I9e499e552b758392dd0c7b8d888944c0150dd22a
| | * | | | | | | | | | | | | | Create bionic unit test library for use with CTS.Christopher Ferris2013-09-231-3/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Bug: 8291716 (cherry picked from commit 153d92765bb693541abf49a2a1d31335e2c90348) Change-Id: Ia53b85b95621b7000034e4c6259d6586d0987dee
| | * | | | | | | | | | | | | | Change hard-coded directory.Christopher Ferris2013-09-231-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The tests are using /data/data which is not accessible to a non-root user. Change this to /data/local/tmp which is accessible to all users. Bug: 8291716 (cherry picked from commit 5227bb363dfdd0a4570cfa3d0735744daf7d83c2) Change-Id: I83bf70aa8edd21b00321363d7ddcb65a5f048ba5
| | * | | | | | | | | | | | | | Change hard-coded temporary directory.Christopher Ferris2013-09-232-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The properties tests creates a temporary directory in /data/nativetest, but this directory might not exist in all circumstances. Change this to create the temporary directory in /data/local/tmp. (cherry picked from commit bd6dc6a8864a1997eb8608030ac816740169c463) Change-Id: I15144ece7ffb5c29eded9a1ef399db630f6af5ab
| * | | | | | | | | | | | | | | am cc362291: am 8427b745: Merge "libc: fortify recvfrom()"Nick Kralevich2013-09-271-0/+8
| |\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * commit 'cc362291362f8183431eccb19267c8a625f36006': libc: fortify recvfrom()
| * \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ am dbd4dbc0: am a1c1a334: Merge "Add a unit test for %n."Elliott Hughes2013-09-251-0/+12
| |\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * commit 'dbd4dbc02c969531ff4891c06e66c63ec7a6d75d': Add a unit test for %n.
| * \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ am f8222078: am 43e5badd: Merge "Fix %hhd formats in the printf family."Elliott Hughes2013-09-231-0/+127
| |\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * commit 'f82220785d20385fa02aa78b02f3fdb98e5aa553': Fix %hhd formats in the printf family.
| * \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ am 48a909c9: am aad3c52e: Merge "Ensure we have the off64_t variant of every ↵Elliott Hughes2013-09-194-0/+144
| |\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | function that takes an off_t." * commit '48a909c9fd6dbe9be5655ad172d1083fa69c4107': Ensure we have the off64_t variant of every function that takes an off_t.
| * \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ am fd5f6f19: am d5ddf40e: Merge "Fix host tests that need the shell."Elliott Hughes2013-09-191-0/+1
| |\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * commit 'fd5f6f192ab6dcc01091b0e36af822dd3480f9b4': Fix host tests that need the shell.
| * \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ am 2443358b: am 4a509d89: Merge "Add bionic-unit-tests-run-on-host special ↵Elliott Hughes2013-09-181-0/+21
| |\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | target" * commit '2443358b3717bdce932303bbcbe625f59e1ae380': Add bionic-unit-tests-run-on-host special target