diff options
| author | Evgeny Eltsin <eaeltsin@google.com> | 2020-06-08 21:19:12 +0200 |
|---|---|---|
| committer | Lev Rumyantsev <levarum@google.com> | 2020-10-19 20:41:10 +0000 |
| commit | ee192afe81a1dcce597a810970854c46719e0bc3 (patch) | |
| tree | 6995d71c9f2c8aeb5565dd6c8ef65e9a83b04582 /tests | |
| parent | 0d97015dbe43f3b5796aa172c2bff676e284d16b (diff) | |
Skip pthread_leak* tests with native_bridge
Bug: 37920774
Bug: 157394871
Test: bionic-unit-tests --gtest_filter=*leak*
Change-Id: Ifc5b66e4b640d1abae4dcf8dbc28612d24c7e972
(cherry picked from commit 45b36c2921c8d5986820d4c07864c7366ad7efd6)
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/leak_test.cpp | 21 |
1 files changed, 9 insertions, 12 deletions
diff --git a/tests/leak_test.cpp b/tests/leak_test.cpp index e0a3d5772..4ebf41f59 100644 --- a/tests/leak_test.cpp +++ b/tests/leak_test.cpp @@ -109,23 +109,21 @@ std::ostream& operator<<(std::ostream& os, const LeakChecker& lc) { // http://b/36045112 TEST(pthread_leak, join) { - LeakChecker lc; + SKIP_WITH_NATIVE_BRIDGE; // http://b/37920774 - for (size_t pass = 0; pass < 2; ++pass) { - for (int i = 0; i < 100; ++i) { - pthread_t thread; - ASSERT_EQ(0, pthread_create(&thread, nullptr, [](void*) -> void* { return nullptr; }, nullptr)); - ASSERT_EQ(0, pthread_join(thread, nullptr)); - } + LeakChecker lc; - // A native bridge implementation might need a warm up pass to reach a steady state. - // http://b/37920774. - if (pass == 0) lc.Reset(); + for (int i = 0; i < 100; ++i) { + pthread_t thread; + ASSERT_EQ(0, pthread_create(&thread, nullptr, [](void*) -> void* { return nullptr; }, nullptr)); + ASSERT_EQ(0, pthread_join(thread, nullptr)); } } // http://b/36045112 TEST(pthread_leak, detach) { + SKIP_WITH_NATIVE_BRIDGE; // http://b/37920774 + LeakChecker lc; // Ancient devices with only 2 cores need a lower limit. @@ -158,8 +156,7 @@ TEST(pthread_leak, detach) { WaitUntilAllThreadsExited(tids, thread_count); - // A native bridge implementation might need a warm up pass to reach a steady state. - // http://b/37920774. + // TODO(b/158573595): the test is flaky without the warmup pass. if (pass == 0) lc.Reset(); } } |
