No description
Find a file
Colin Cross ca71f170b7 Make memunreachable_test more robust against false negative leaks
For some reason, the memunreachable tests are rock solid on the
devices covered by APCT, but catch a ton of false-negatives on
hikey960, which show up as failures that look like:
system/core/libmemunreachable/tests/MemUnreachable_test.cpp:200: Failure
Expected equality of these values:
  1U
    Which is: 1
  info.leaks.size()
    Which is: 0

These happen when a stray copy of a pointer is lying around that
points to the memory it is expected to leak.  The stray pointers
can be on the stack or in the jemalloc thread cache of freed
allocations, which is always considered active memory.

Add some extra cleanups to get rid of old pointers.
1.  Clear the tcache when destructing UnreachableMemoryInfo
2.  Clear the stack and tcache before and after each test
3.  Make MemunreachbleTest.twice match MemunreachableTest.stack

Also fix MemunreachableTest.notdumpable, which was only passing
when run as root, which was bypassing what the test was trying
to cover.  Make the test pass when run as non-root, and skip
when the test is running as root.

Bug: 79701104
Test: memunreachable_test
Test: memunreachable_test as root
Change-Id: Ia6c6df11e76405d08118afcc19c1fe80a6684c56
2018-05-14 15:24:28 -07:00
adb Merge "adb: add authorizing, connecting states to transport." 2018-05-09 20:43:31 +00:00
adf Merge "Add OWNERS." 2017-12-07 23:21:26 +00:00
base Add test_suites lines. 2018-04-27 16:12:06 -07:00
bootstat bootstat: test reboot rescueparty 2018-05-07 10:10:18 -07:00
cpio Possible null pointer miss on realloc 2017-03-23 22:41:14 +01:00
debuggerd Merge "Remove unnecessary references to libunwind." 2018-05-04 20:40:42 +00:00
demangle Remove the 'optional' tag from demangle_fuzzer 2018-05-04 15:59:07 -05:00
diagnose_usb Copy adb/OWNERS to diagnose_usb/OWNERS. 2018-03-05 15:47:43 -08:00
fastboot Make fastboot host builds match adb. 2018-05-08 11:30:07 -07:00
fs_mgr fs_mgr: target-agnostic device-mapper helpers 2018-05-03 16:35:09 -07:00
gatekeeperd resolve merge conflicts of 0dd4b6aa3 to stage-aosp-master 2017-09-15 16:50:34 +09:00
healthd healthd: Add elsk as OWNERS 2018-05-03 12:25:00 -07:00
include Move android_filesystem_config.h => fs_config.h 2017-08-03 17:20:27 +00:00
init Merge "Remove unused using statement / host stub" 2018-05-10 00:07:50 +00:00
libappfuse bpfmt. 2018-02-16 17:58:14 -08:00
libasyncio Merge "Make libasyncio headers usable from C" 2018-03-06 19:35:21 +00:00
libbacktrace Merge "Remove unnecessary references to libunwind." 2018-05-03 23:05:51 +00:00
libbinderwrapper Make libbinderwrapper available in /vendor partition 2018-04-06 08:41:21 +09:00
libcrypto_utils Mark the modules as VNDK in Android.bp 2017-09-14 08:35:16 +00:00
libcutils Merge "libctuils: Exclude qtaguid.cpp from VNDK-SP variant" 2018-05-09 01:56:00 +00:00
libdiskconfig Rename target.linux[_x86[_64]] to target.linux_glibc[_x86[_64]] 2017-10-02 10:44:29 -07:00
libgrallocusage Use -Werror in system/core 2017-11-01 11:32:55 -07:00
libion libion: cleanup logging 2018-03-07 10:56:06 -08:00
libkeyutils Add test_suites lines. 2018-04-27 16:12:06 -07:00
liblog Add missing @addtogroup tags. 2018-04-13 14:49:41 -07:00
libmemtrack Add OWNERS. 2017-12-07 13:30:03 -08:00
libmemunreachable Make memunreachable_test more robust against false negative leaks 2018-05-14 15:24:28 -07:00
libmetricslogger Add support for logging complex events from C++. 2018-05-08 10:27:09 +01:00
libnativebridge bpfmt. 2018-02-16 17:58:14 -08:00
libnativeloader bpfmt. 2018-02-16 17:58:14 -08:00
libnetutils Add OWNERS. 2017-12-07 13:30:03 -08:00
libpackagelistparser bpfmt. 2018-02-16 17:58:14 -08:00
libpixelflinger MIPS[64]: codeflinger: Fix build due to unused variable warnings 2017-11-06 16:38:49 +01:00
libprocessgroup libprocessgroup: remove legacy C string handling and build for host 2018-02-27 14:12:19 -08:00
libprocinfo Add test_suites lines. 2018-04-27 16:12:06 -07:00
libqtaguid Redirect qtaguid native call to netd fwmark client 2017-11-09 18:02:22 -08:00
libsparse libsparse: Use 'size_t' for the 'len' parameter in callbacks. 2018-04-25 10:29:22 -07:00
libsuspend Add force_suspend function 2018-01-19 12:30:39 -08:00
libsync Add missing @addtogroup tags. 2018-04-13 14:49:41 -07:00
libsystem bpfmt. 2018-02-16 17:58:14 -08:00
libsysutils Include iface index in the netlink event 2018-03-07 11:39:52 +09:00
libunwindstack Add test_suites lines. 2018-04-27 16:12:06 -07:00
libusbhost Remove urb request size maximum. 2018-02-07 16:12:14 -08:00
libutils Remove more semicolons at the end of namespaces 2018-04-11 23:14:13 -07:00
libvndksupport bpfmt. 2018-02-16 17:58:14 -08:00
libziparchive Make ziparchive-tests run standalone. 2018-04-25 12:50:17 -07:00
llkd llkd: bootstat: propagate detailed livelock canonical boot reason 2018-04-18 14:02:16 -07:00
lmkd lmkd: limit capability set to minimum 2018-04-16 14:51:56 -07:00
logcat Add event log tag for hidden API access logging. 2018-05-08 10:26:36 +01:00
logd Remove more bogus <stdbool.h> #includes from C++. 2018-05-08 13:00:06 -07:00
logwrapper Remove misleading comment. 2018-04-23 21:50:43 -07:00
mkbootimg Add fastboot --os-version and --os-patch-level. 2018-04-09 18:37:39 +00:00
property_service Add test_suites lines. 2018-04-27 16:12:06 -07:00
qemu_pipe Add OWNERS. 2017-12-07 13:30:03 -08:00
reboot reboot: only pause indefinitely for non-shutdown operations 2017-09-29 16:29:52 +00:00
rootdir Add a public.libraries.txt file for iot devices. 2018-04-20 13:46:55 -07:00
run-as run-as: Keep supplementary groups. 2017-09-29 15:34:23 -04:00
sdcard Remove FUSE logic; it's only a sdcardfs wrapper. 2018-01-12 15:41:55 -07:00
shell_and_utilities Update shell and utilities docs. 2018-05-03 11:02:07 -07:00
storaged Merge "storaged: lower capabilities in init" 2018-04-12 15:55:26 +00:00
toolbox Compile toolbox's newfs_msdos for the host 2018-05-02 13:14:51 -07:00
trusty bpfmt. 2018-02-16 17:58:14 -08:00
usbd bpfmt. 2018-02-16 17:58:14 -08:00
.clang-format
.clang-format-2 Only allow short functions in class definitions. 2017-03-28 12:31:37 -07:00
.clang-format-4 Only allow short functions in class definitions. 2017-03-28 12:31:37 -07:00
.gitignore
Android.bp
Android.mk
CleanSpec.mk Add VNDK version for namespace configuration files 2017-12-13 10:31:04 +09:00
MODULE_LICENSE_APACHE2
NOTICE
OWNERS Add ek and lorenzo to OWNERS for system/core netlink code. 2018-03-05 19:18:02 +09:00
platform_tools_tool_version.mk Fix warning on the build servers 2017-05-25 12:35:40 -07:00
PREUPLOAD.cfg