aboutsummaryrefslogtreecommitdiff
path: root/tests
Commit message (Collapse)AuthorAgeFilesLines
* Merge "Extend bionic-unit-tests timeout." into android13-tests-dev am: ↵Treehugger Robot2023-02-011-0/+9
|\ | | | | | | | | | | | | | | | | 9c1e170668 am: 5d0345280a am: 99ebeb82c6 Original change: https://android-review.googlesource.com/c/platform/bionic/+/2417212 Change-Id: I8f3ebd30d1118297691e5849baa822941365928d Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
| * Extend bionic-unit-tests timeout.Mitch Phillips2023-02-011-0/+9
| | | | | | | | | | | | | | | | | | | | GWP-ASan stress tests can take a while, especially under HWASan. Bug: 238585984 Test: sleep(100) in one of the tests, and then 'atest bionic-unit-tests' Merged-In: Ibd983da1c8fd06cffed756cf3b24523f4671d49e Change-Id: Ibd983da1c8fd06cffed756cf3b24523f4671d49e (cherry picked from commit 1f3c8d688c8225dd725794562962d7726b590282)
* | Snap tm-dev to android13-tests-dev am: 28e71b61c6 am: 8db32c19adSamip Garg2023-01-164-10/+39
|\| | | | | | | | | | | | | Original change: https://googleplex-android-review.googlesource.com/c/platform/bionic/+/20514346 Change-Id: Ibbee063ceabb77aceae5878b11648441d8e02127 Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
| * Disable MemtagNoteTest#SEGV for native bridgedimitry2022-11-071-0/+1
| | | | | | | | | | | | | | | | | | This commit disables MemtagNoteTest#SEGV when running on native bridge. Bug: http://b/242170715 Test: run arm64 Bionic tests on T Emulator Change-Id: I8ae99c5ba22f09a8d7e751f8bb4938894abe231f
| * Fix-up for change in pwd/grp ids for PRNG seeder daemonOrion Hodson2022-10-271-0/+11
| | | | | | | | | | | | | | | | | | | | The PRNG seeder daemon is introduced in TM-QPR2 which can lead to breakage running Android 13 CTS tests depending on when the platform and CTS tests are built. Fix: 253185870 Test: run cts --module CtsBionicTestCases Change-Id: I94fa0aa2f32b09222aee08891e7643bf14d1a204
| * Merge "Merge "stack_protector_DeathTest#modify_stack_protector: avoid ↵Automerger Merge Worker2022-10-061-3/+4
| |\ | | | | | | | | | | | | | | | | | | | | | | | | flake." into android12-tests-dev am: 793d1fb5ab" into android12L-tests-dev am: 6aa3bdfb16 Original change: https://android-review.googlesource.com/c/platform/bionic/+/2240186 Change-Id: I479c56a6509cef84a1f614a937a6434ebce5dbcd Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
| | * stack_protector_DeathTest#modify_stack_protector: avoid flake.Elliott Hughes2022-10-041-3/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | I've never been able to repro the flake myself (in hundreds of thousands of runs), but it's certainly possible that a byte of the cookie is already zero. So let's invert the byte we plan to corrupt rather than set it to zero. Bug: http://b/202948861 Test: treehugger Change-Id: Iccd552fe302d6c01e376819d23c11a308e03acdb (cherry picked from commit 23ce50c1728c6bc6986e12073d5d3c8ab10d05d0)
| * | Merge android12L-tests-dev@8941410.Xin Li2022-08-171-7/+23
| |\| | | | | | | | | | Change-Id: I5c71068d05f27bff99f1adc17400c0ec709b4dd0
| | * Merge "Merge "mntent_test: don't assume /proc isn't the first mount." into ↵Automerger Merge Worker2022-05-181-7/+23
| | |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | android10-tests-dev am: 0462cfb766" into android11-tests-dev am: 0a5cc21c42 Original change: https://android-review.googlesource.com/c/platform/bionic/+/2098734 Change-Id: Ic585470d3f383c9dcbc6e989b46ec8d6ce17eefd Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
| | | * Merge "mntent_test: don't assume /proc isn't the first mount." into ↵Shubhangi Pawar2022-05-181-7/+23
| | | |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | android10-tests-dev am: 0462cfb766 Original change: https://android-review.googlesource.com/c/platform/bionic/+/2098734 Change-Id: I92a208d548197b48fc35082b5e219895bf16a904 Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
| | | | * mntent_test: don't assume /proc isn't the first mount.Elliott Hughes2022-05-161-7/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This test tried to be lazy and test both getmntent() and getmntent_r() in the same test, but that led to an implicit assumption that /proc isn't the first mount returned. This new version is quite a bit more thorough than the old. It does assume that the mount list doesn't change while the test is running, but that seems like a reasonable assumption to make during CTS? Bug: https://issuetracker.google.com/230228681 Test: treehugger Change-Id: I5c5f0b86ae1c4df9a2ce69d48e1c3accb42c687b (cherry picked from commit 1e393b0699745d6120d2fd43f58dc3d5863e3b87)
| | * | | Merge "Merge "Fix unistd.exec_argv0_null for new kernels." into ↵Automerger Merge Worker2022-04-271-2/+12
| | |\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | android10-tests-dev am: 16457fd9d0" into android11-tests-dev am: ede618aef2 Original change: https://android-review.googlesource.com/c/platform/bionic/+/2078358 Change-Id: I716eacb116e3a4a29acd1aa10ad96f43c583b56b Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
| | | * | Merge "Fix unistd.exec_argv0_null for new kernels." into android10-tests-dev ↵Treehugger Robot2022-04-271-2/+12
| | | |\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | am: 16457fd9d0 Original change: https://android-review.googlesource.com/c/platform/bionic/+/2078358 Change-Id: I70cff5fe0a62321c8d71d1e88f616a21b4879cf8 Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
| | | | * Fix unistd.exec_argv0_null for new kernels.Elliott Hughes2022-04-271-2/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There are other options here (see the code comment for details), but this is the least effort/least disruptive for now. Bug: 228898932, 227498625 Test: treehugger Change-Id: I33be6fbfc022238de2f1846a69af1e712a9d6391 (cherry picked from commit bb1cc5a82c8e19d5f4231988ba48ce3de43ff3ed)
| | | | * Fix possible issue with cfi_basic test.pyung.lee2020-10-061-4/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It's possible for malloc to return a pointer that is not going to crash with __cfi_slowpath. It's possible to modify the cfi code to avoid this problem, but I'm not convinced that this will be any better at catching problems. So I'm just modifying the test so that it will eventually allocate a pointer that does not overlap. This previous version of the test failed on jemalloc svelte config, but there is nothing that would not result in a failure on scudo leading to a failure every once in a while. Bug: 142556796 Bug: 140079007 Test: cts -m CtsBionicTestCases Change-Id: Ibf12a286c411e0bdc9f81589f2f66fd0ccd7f07a (cherrypick of f322483b3f8a6e05db5c3fc7974601032a03ba0a)
| | | | * Merge "Remove stack address check in cfi_basic test." into android10-tests-devTreehugger Robot2020-07-291-3/+0
| | | | |\
| | | | | * Remove stack address check in cfi_basic test.Evgenii Stepanov2020-07-231-3/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is not actually a property that is guaranteed by the bionic implementation of CFI shadow. Since the gaps between libraries are not completely inaccessible, it is possible for a stack mapping to sneak in, which would cause the callback to register in the test library. This is not a correctness issue in CFI as the actual __cfi_check callback will reject such address anyway, at a small CPU cost. Bug: 156218352 Test: CtsBionicTestCases-cfi_test#basic Change-Id: I8d04fb7132e1eac2a8abfbc48a37c8eac6e25a09 (cherry picked from commit 0f6b504e0c682e7c3d377416dacfe57b6c59f1b8)
| | | | * | Merge "Fix linker path for emulated architecture" into android10-tests-devTreehugger Robot2020-01-091-9/+42
| | | | |\ \
| | | | | * | Fix linker path for emulated architectureDmytro Chystiakov2019-12-061-9/+42
| | | | | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | dl#exec_linker* tests are failing on devices with emulated architecture due to hardcoded path to linker. Test: bionic-unit-tests --gtest_filter=dl.exec_linker* Bug: b/141914915 Change-Id: Id6d8d3ee7114e70b07e44034aa62dce0a3e0760e Signed-off-by: Dmytro Chystiakov <dmytro.chystiakov@intel.com> (cherry picked from commit 595c38184120e286670aa1ae60b6ae35c62147b7)
| | | | * / Fix Bionic dlfcn.dladdr_libc test case for 64bit binary translationsDmytro Chystiakov2019-12-051-3/+3
| | | | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 64bit libraries should be located in /system/lib64 directory instead of /system/lib for platforms with emulated arhitecture. This patch updated ALTERNATE_PATH_TO_SYSTEM_LIB for 64bit values Test: run cts -m CtsBionicTestCases -t dlfcn.dladdr_libc Bug: 129389761 Change-Id: I29d6d36d15d7e61818c7ed1cfd0786745d9ae6a2 Signed-off-by: Dmytro Chystiakov <dmytro.chystiakov@intel.com> (cherry picked from commit e712cd185f34dd154b4672abae76eae262a03c65)
| | | | * Stop executing if skip occurs.Christopher Ferris2019-09-251-0/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Bug: 141358530 Test: Forced a skip and verified it registers as a skip. Change-Id: I9915c67ebae4389a26f28e16375ad4a41f3e4837 (cherry picked from commit 103b998a52fa80eee2c85a420533bf75a0b11e41)
| | | * | Merge "Skip pthread_leak* tests with native_bridge" into android11-tests-devTreehugger Robot2020-10-191-12/+9
| | | |\ \
| | | | * | Skip pthread_leak* tests with native_bridgeEvgeny Eltsin2020-10-191-12/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Bug: 37920774 Bug: 157394871 Test: bionic-unit-tests --gtest_filter=*leak* Change-Id: Ifc5b66e4b640d1abae4dcf8dbc28612d24c7e972 (cherry picked from commit 45b36c2921c8d5986820d4c07864c7366ad7efd6)
| | | * | | Skip MTE tests with native_bridgeEvgeny Eltsin2020-10-191-0/+6
| | | |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | With native_bridge, native and emulated parts exchange data, including pointers. If tagging on native architecture is different from tagging on emulated architecture, all the pointers in the data exchange must be identified and marshalled, which is hardly feasible. Disable MTE tests with native_bridge. Bug: 135772972 Bug: 159352723 Test: bionic-unit-tests --gtest_filter=*mte* Change-Id: Icba90636173e9e71036def5302c7d0a09dd8873b (cherry picked from commit ed51fb9a078aa57bc0e8a1c8a71f69275f00edf9)
| | | * | Skip android_unsafe_frame_pointer_chase.pthread with native bridgeEvgeny Eltsin2020-09-172-0/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Bug: 167968941 Bug: 161082441 Test: bionic-unit-tests --gtest_filter=android_unsafe_frame_pointer_chase.pthread Change-Id: I42a8121003be2fbcd1486b0d5281bc60ac67eb22
| | | * | Skip pthread.pthread_create__mmap_failures with native_bridgeEvgeny Eltsin2020-09-171-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The test reserves all memory but the minimum required to create a thread. However, after the thread is created, native_bridge needs more memory to translate and run the thread function. This might be prevented by native_bridge preallocating a memory buffer to be used for translation. But, first, this complication seems to be needed just for this kind of tests, and, second, it is pretty flaky regarding changes both in native_bridge and bionic. Looks better to disable this test with native_bridge. Bug: 67745607 Bug: 148608153 Bug: 157394871 Test: bionic-unit-tests --gtest_filter=pthread.pthread_create__mmap_failures Change-Id: I42ce2b5a01a7d9f10d952a5fc7b75d51fa89072a (cherry picked from commit b4f7aaac5cdda45ff0d9dc58e1fd2d727601f619)
| | | * | Add util to skip tests with native_bridgeEvgeny Eltsin2020-09-171-0/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Bug: 37920774 Bug: 157394871 Test: bionic-unit-tests Change-Id: Id949c9e568fd068daaf405a377813ee1480c2df7 (cherry picked from commit b56d1182d1067e70910584cf0c8fd797a262d82a)
| | | * | Remove stack address check in cfi_basic test.Evgenii Stepanov2020-08-111-3/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is not actually a property that is guaranteed by the bionic implementation of CFI shadow. Since the gaps between libraries are not completely inaccessible, it is possible for a stack mapping to sneak in, which would cause the callback to register in the test library. This is not a correctness issue in CFI as the actual __cfi_check callback will reject such address anyway, at a small CPU cost. Bug: 156218352 Test: CtsBionicTestCases-cfi_test#basic Change-Id: I8d04fb7132e1eac2a8abfbc48a37c8eac6e25a09 Merged-In: I8d04fb7132e1eac2a8abfbc48a37c8eac6e25a09 (cherry picked from commit 0f6b504e0c682e7c3d377416dacfe57b6c59f1b8)
| | | * | Don't test pw_shell for old vendor imagesTom Cherry2020-07-101-1/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | R GSI on P product tests fail since pw_shell has changed. This value has no practical use on Android, so we ignore testing it for older vendor images. Bug: 160937247 Test: this test does/doesn't run appropriately Merged-In: Ie485bd019b3826e71ad19131effcbb002f888d52 Change-Id: Ie485bd019b3826e71ad19131effcbb002f888d52 (cherry picked from commit b9fa04d805912d58d920ccd1a7af77daf81293e7)
| | | * | Use PROT_NONE on the unused parts of CFI shadow.Evgenii Stepanov2020-06-051-6/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This replaces a single 2Gb readable memory region with a bunch of tiny regions, and leaves the bulk of 2Gb mapped but unaccessible. This makes it harder to defeat ASLR by probing for the CFI shadow region. Sample CFI shadow mapping with this change: 7165151000-716541f000 ---p 00000000 00:00 0 [anon:cfi shadow] 716541f000-7165420000 r--p 00000000 00:00 0 [anon:cfi shadow] 7165420000-71654db000 ---p 00000000 00:00 0 [anon:cfi shadow] 71654db000-71654dc000 r--p 00000000 00:00 0 [anon:cfi shadow] 71654dc000-71654dd000 r--p 00000000 00:00 0 [anon:cfi shadow] 71654dd000-71654f0000 ---p 00000000 00:00 0 [anon:cfi shadow] 71654f0000-71654f1000 r--p 00000000 00:00 0 [anon:cfi shadow] 71654f1000-71e5151000 ---p 00000000 00:00 0 [anon:cfi shadow] This change degrades CFI diagnostics for wild jumps and casts (i.e. when the target of a CFI check is outside of any known library bounds). This is acceptable, because CFI does not have much to tell about those cases anyway. Such bugs will show up as SEGV_ACCERR crashes inside __cfi_slowpath in libdl.so from now on. Bug: 158113540 Test: bionic-unit-tests/cfi_test.* Test: adb shell cat /proc/$PID/maps | grep cfi Change-Id: I57cbd0d3f87eb1610ad99b48d98ffd497ba214b4
| | | * | Handle the alternate signal stack correctly in ↵Peter Collingbourne2020-06-031-3/+63
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | android_unsafe_frame_pointer_chase. If an alternate signal stack is set and the frame record is in bounds of that stack, we need to use the top of the alternate signal stack for bounds checking rather than the normal stack. Bug: 150215618 Change-Id: I78b760d61b27da44f8e0cfee3fe94a791011fe58 Merged-In: I78b760d61b27da44f8e0cfee3fe94a791011fe58
| | | * | fdtrack: don't do anything while vforked.Josh Gao2020-05-121-0/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Bug: http://b/153926671 Test: 32/64-bit bionic-unit-tests on blueline, x86_64 emulator Change-Id: If42905f3d6a76ed70a45e5b9edd029ffd7789045 (cherry picked from commit 41291131284471eed7cb6c22cac8b442fd3d1c52)
| | | * | fdsan: don't do anything when vforked.Josh Gao2020-05-121-0/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Bug: http://b/153926671 Test: 32/64-bit bionic-unit-tests on blueline, x86_64 emulator Change-Id: Id351a993e396774b68239edfef83d9e81205290b (cherry picked from commit 65fb2a7f0304fda4463771ae40f8b83728e74a62)
| | | * | Track whether a thread is currently vforked.Josh Gao2020-05-121-0/+43
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Our various fd debugging facilities get extremely confused by a vforked process closing file descriptors in preparation to exec: fdsan can abort, and fdtrack will delete backtraces for any file descriptors that get closed. Keep track of whether we're in a vforked child in order to be able to detect this. Bug: http://b/153926671 Test: 32/64-bit bionic-unit-tests on blueline, x86_64 emulator Change-Id: I8a082fd06bfdfef0e2a88dbce350b6f667f7df9f (cherry picked from commit 230328374018c7ca4e82a47ff4eb91dd2f79a5c3)
| | | * | Merge "Fix foritfy test for clang update." into rvc-devYabin Cui2020-05-051-0/+2
| | | |\ \
| | | | * | Fix foritfy test for clang update.Yabin Cui2020-04-301-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When doing checkbuild for make_fortify_compile_test.mk: bionic/tests/clang_fortify_tests.cpp error: 'error' diagnostics seen but not expected: Line 171: 'mempcpy' will always overflow; destination buffer has size 8, but size argument is 9 1 error generated. Bug: 149839606 Test: run checkbuild. Change-Id: I97371600f6183b5cee8c2a6b976f5bf33e1f781d (cherry picked from commit ae1745d37550de264b600b08c13242513116b8ac)
| | | * | | Fix argument order in api level testAlistair Delva2020-05-041-1/+1
| | | |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Looks like the arguments were unintentionally swapped? Bug: 155526611 Change-Id: I39d49f94387cfd337c89becb5eb6f85ca638bef1 Merged-In: I39d49f94387cfd337c89becb5eb6f85ca638bef1 Signed-off-by: Alistair Delva <adelva@google.com> (cherry picked from commit bed98c0deb429dca7947d6b0190ff62cc92f2608)
| | | * | Merge changes I8b25accf,I59013f0c,I6c881e5d,I66826f31,I552692ae, ... into ↵Josh Gao2020-04-301-11/+151
| | | |\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | rvc-dev * changes: fdtrack: add wrapper for socketpair. fdtrack: add wrapper for eventfd. fdtrack: add wrappers for epoll_create, epoll_create1. fdtrack: add wrappers for pipe, pipe2. fdtrack: add tests for individual wrappers. fdtrack: don't destroy traces.
| | | | * | fdtrack: add wrapper for socketpair.Josh Gao2020-04-291-0/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Bug: https://issuetracker.google.com/154450436 Test: bionic-unit-tests Change-Id: I8b25accf00dc01f6fab351f3ba612f6b0ff9d094 (cherry picked from commit b107eab5ef1d5946bd753cad0e8b178172d362df)
| | | | * | fdtrack: add wrapper for eventfd.Josh Gao2020-04-291-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Bug: https://issuetracker.google.com/154450436 Test: bionic-unit-tests Change-Id: I59013f0c4da0debbcc50269c64ae9db0cdc4eaa0 (cherry picked from commit 7de412443dd4201c61d7bb17c443bbf2dfd96bad)
| | | | * | fdtrack: add wrappers for epoll_create, epoll_create1.Josh Gao2020-04-291-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Bug: https://issuetracker.google.com/154450436 Test: bionic-unit-tests Change-Id: I6c881e5d67596c543526536541d5b8086e21d9e9 (cherry picked from commit a38331d833fb74607e964b0749427415545018fe)
| | | | * | fdtrack: add wrappers for pipe, pipe2.Josh Gao2020-04-291-26/+55
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Bug: https://issuetracker.google.com/154450436 Test: bionic-unit-tests Change-Id: I66826f312a65ab9f1bd8193bf684e330baa952dc (cherry picked from commit 1fad5283a07e87b3ae28f4a2dd6943d600c2926b)
| | | | * | fdtrack: add tests for individual wrappers.Josh Gao2020-04-291-11/+107
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add tests for all of our existing wrappers (with one commented out, because it's unexpectedly generating multiple events). Bug: https://issuetracker.google.com/154450436 Test: bionic-unit-tests Change-Id: I552692aef952237c2eee0dabec61b7ea7fd230e3 (cherry picked from commit 9d512402d4a07053f179bf33d78a9beda1424306)
| | | * | | Fix possible issue with cfi_basic test.Christopher Ferris2020-04-201-4/+15
| | | |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It's possible for malloc to return a pointer that is not going to crash with __cfi_slowpath. It's possible to modify the cfi code to avoid this problem, but I'm not convinced that this will be any better at catching problems. So I'm just modifying the test so that it will eventually allocate a pointer that does not overlap. This previous version of the test failed on jemalloc svelte config, but there is nothing that would not result in a failure on scudo leading to a failure every once in a while. Bug: 142556796 Bug: 140079007 Test: Ran bionic unit tests with jemalloc and scudo. Change-Id: Iff45bd950d2eb33ff56dc700a2d739b5b578e090 Merged-In: Iff45bd950d2eb33ff56dc700a2d739b5b578e090 (cherry picked from commit f322483b3f8a6e05db5c3fc7974601032a03ba0a)
| | | * | dynamic libc: ignore ART profiling signal by default.Florian Mayer2020-03-301-5/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | These solves the issue that targetting non-profilable apps crashed them. There is still a race condition between starting the app and the SIG_IGN being installed, but that will be fixed in follow-ups. This also does not cover programs that statically link libc, but those are rare. This might be reverted if we find a more general solution to b/151835887. Bug: 151328035 Test: java profile sysui, doesn't crash Test: atest CtsBionicTestCases This is a cherry-pick of 96272df35cbc89c696dcacc0796519a89d9e2212 Change-Id: I6b99352ed50afe15a609f7ddb85312c2676ddf11 Merged-In: I6b99352ed50afe15a609f7ddb85312c2676ddf11
| | | * | Rewrite __cxa_atexit / __cxa_finalizeRyan Prichard2020-03-092-0/+78
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Simplify: - Use a single memory-mapped region to hold the table of destructors. Double its capacity each time it is expanded. - Add a recompaction pass at the end of __cxa_finalize that shifts entries forward and uses madvise to clean pages. Bug: http://b/148055738 Test: bionic-unit-tests Change-Id: Ieb9da2b88640a8a5277d217b43826b5b7e246781 (cherry picked from commit afa983c8d44400d45c1f0e2b8e90a8be04acf6f7)
| | | * | Add a libc wrapper for statx(2).Elliott Hughes2020-02-251-0/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Bug: http://b/127675384 Bug: http://b/146676114 Test: treehugger Change-Id: I844edc12f62717e579870a040cf03dfe60dc280b (cherry picked from commit 733cedd1c4696ea74dab34d629ef7ac28ecc2200)
| | * | | Regression test for scudo crash in resizeTaggedChunk.Evgenii Stepanov2021-11-241-0/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is a copy of the upstream scudo test for CTS: https://reviews.llvm.org/rG913d78c40c37c9c3428285d868ce454b058e40f3 Bug: 206701345 Test: CtsBionicTestCases Change-Id: I76b6b33c0665d7ad3bdd8c07d39a39d0d24d94df (cherry picked from commit f0d7a34e257494c7a0248e399849bb714bb9fcc4)
| | * | | Skip the malloc_slack test on native bridge.Christopher Ferris2021-10-121-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The allocator for the native bridge is not necessarily going to allocate the slack data. Bug: 202428612 Test: Ran on non-native bridge and verified test isn't skipped. Test: Ran on native bridge and verified test is skipped. Change-Id: Ia1555be0e9f55896af7ca81830605367133c44a1 (cherry picked from commit 7c0ce86a00433159dfc5dc7164feb752d094dff4)
| | * | | Make MTE tests pass with all values of MEMTAG_OPTIONS.Evgenii Stepanov2021-07-133-10/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Do not assume that tests start with Sync MTE; check the initial setting and change test logic as appropriate. Bug: 192480262 Test: bionic-unit-tests with MEMTAG_OPTIONS=(off|sync|async) Merged-In: Id80301e6426af16f89bd80a7a7ab127b6fd60425 Change-Id: Id80301e6426af16f89bd80a7a7ab127b6fd60425 (cherry picked from commit 53df1f3772ad4843461e78540111b21e9061c051)