Commit graph

4 commits

Author SHA1 Message Date
Evgeny Eltsin
284c4fdc39 Add a warm up pass to pthread_leak.join test
Bug: 73105445
Bug: 37920774
Test: bionic-unit-tests --gtest_filter=pthread_leak*
Change-Id: I227c999ecc13ee0a2136ff6b00a722f135dd48fe
(cherry picked from commit 775fb09621)
2018-05-07 13:16:16 +02:00
Elliott Hughes
a838490101 Fix pthread_leak test flakiness.
Stop allocating and deallocating memory as part of the test itself.

There's still the fopen, but since our stdio reuses existing structs,
that doesn't seem to be a problem in practice.

Bug: http://b/67077411
Test: ran tests with --gtest_repeat=1000
Change-Id: I99de5de0911161ec04afe75653075f1ccefb01a5
2017-10-03 13:51:45 -07:00
Zhenhua WANG
cf17b487ef test: check unbounded memory leak in pthread detach
In pthread_leak.detach test, compare the memory usage after two same
scenarios - all children threads have exited. Thus, test emulated by
NativeBridge, which may reserve a memory pool, will pass if it's not
unbounded leak.

Bug: https://issuetracker.google.com/37920774
Test: CtsBionicTestCases
Change-Id: Ia51aa67bacb588284747652b36ea5d8e85bea832
2017-05-12 11:09:45 -07:00
Josh Gao
7d15dc388a Add tests for pthread TLS leak.
Add tests that ensure that threads don't leak memory mappings after
they exit.

Bug: http://b/36045112
Test: /data/nativetest/bionic-unit-tests/bionic-unit-tests --gtest_filter=*leak*
Test: /data/nativetest64/bionic-unit-tests/bionic-unit-tests --gtest_filter=*leak*
Change-Id: Id0c1194b5d2bb7d89947b1ade16eb0d768d8c5b7
2017-03-15 13:30:05 -07:00