aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--tests/leak_test.cpp9
1 files changed, 4 insertions, 5 deletions
diff --git a/tests/leak_test.cpp b/tests/leak_test.cpp
index 600520959..fc72c4589 100644
--- a/tests/leak_test.cpp
+++ b/tests/leak_test.cpp
@@ -126,10 +126,9 @@ TEST(pthread_leak, detach) {
LeakChecker lc;
constexpr int kThreadCount = 100;
- // Devices with low power cores/low number of cores can not finish test in time hence decreasing
- // threads count to 90.
- // http://b/129924384.
- int threads_count = (sysconf(_SC_NPROCESSORS_CONF) > 2) ? kThreadCount : (kThreadCount - 10);
+ // Ancient devices with only 2 cores need a lower limit.
+ // http://b/129924384 and https://issuetracker.google.com/142210680.
+ int threads_count = (sysconf(_SC_NPROCESSORS_CONF) > 2) ? kThreadCount : (kThreadCount - 50);
for (size_t pass = 0; pass < 1; ++pass) {
struct thread_data { pthread_barrier_t* barrier; pid_t* tid; } threads[kThreadCount] = {};
@@ -155,7 +154,7 @@ TEST(pthread_leak, detach) {
pthread_barrier_wait(&barrier);
ASSERT_EQ(pthread_barrier_destroy(&barrier), 0);
- WaitUntilAllExited(tids, arraysize(tids));
+ WaitUntilAllExited(tids, threads_count);
// A native bridge implementation might need a warm up pass to reach a steady state.
// http://b/37920774.