diff options
author | android-build-prod (mdb) <android-build-team-robot@google.com> | 2020-01-16 18:45:39 +0000 |
---|---|---|
committer | Gerrit Code Review <noreply-gerritcodereview@google.com> | 2020-01-16 18:45:39 +0000 |
commit | 4c7799f873fbc719ce255cbff0afd6575075c88b (patch) | |
tree | a946897f9b920de4d9add5d3be6b7f5f5490f5d1 | |
parent | ebc58fd03da739bd2d3700ed964f16d9cd103a44 (diff) | |
parent | 1b13299bc39000dc1c1a2849987e83c2eda9e8b0 (diff) | |
download | bionic-4c7799f873fbc719ce255cbff0afd6575075c88b.tar.gz |
Merge "Snap for 6139873 from 29cf9a839f5b8393963c1b9d9b2585c9d146b5c0 to pie-cts-release" into pie-cts-releaseandroid-cts-9.0_r20android-cts-9.0_r19android-cts-9.0_r18android-cts-9.0_r17android-cts-9.0_r16android-cts-9.0_r15android-cts-9.0_r14android-cts-9.0_r13android-cts-9.0_r12android-cts-9.0_r11
-rw-r--r-- | tests/leak_test.cpp | 9 |
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. |