aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorEvgeny Eltsin <eaeltsin@google.com>2020-06-09 15:49:20 +0200
committerLev Rumyantsev <levarum@google.com>2020-09-17 20:37:21 +0000
commit55c315335da754c540fae82e7ea44e65a4d424fe (patch)
treea086ce8b26152fdccd6969bd077b5e51fcdb59b5 /tests
parent47df89fcfb21db19bbb6cfc416903e6b4127b102 (diff)
Skip pthread.pthread_create__mmap_failures with native_bridge
The test reserves all memory but the minimum required to create a thread. However, after the thread is created, native_bridge needs more memory to translate and run the thread function. This might be prevented by native_bridge preallocating a memory buffer to be used for translation. But, first, this complication seems to be needed just for this kind of tests, and, second, it is pretty flaky regarding changes both in native_bridge and bionic. Looks better to disable this test with native_bridge. Bug: 67745607 Bug: 148608153 Bug: 157394871 Test: bionic-unit-tests --gtest_filter=pthread.pthread_create__mmap_failures Change-Id: I42ce2b5a01a7d9f10d952a5fc7b75d51fa89072a (cherry picked from commit b4f7aaac5cdda45ff0d9dc58e1fd2d727601f619)
Diffstat (limited to 'tests')
-rw-r--r--tests/pthread_test.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/tests/pthread_test.cpp b/tests/pthread_test.cpp
index d8257381c..851b86f50 100644
--- a/tests/pthread_test.cpp
+++ b/tests/pthread_test.cpp
@@ -2821,6 +2821,9 @@ TEST(pthread, pthread_attr_getdetachstate__pthread_attr_setdetachstate) {
}
TEST(pthread, pthread_create__mmap_failures) {
+ // After thread is successfully created, native_bridge might need more memory to run it.
+ SKIP_WITH_NATIVE_BRIDGE;
+
pthread_attr_t attr;
ASSERT_EQ(0, pthread_attr_init(&attr));
ASSERT_EQ(0, pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED));