diff options
| author | 2015-01-08 16:43:13 -0800 | |
|---|---|---|
| committer | 2015-01-08 16:43:13 -0800 | |
| commit | 128654970b4a9c5eab380f60c788760f791d4509 (patch) | |
| tree | a92db0e38ebf9477b962047c989437dbc51390f4 /runtime/java_vm_ext_test.cc | |
| parent | 553727e466942a10e11ee39dcb67e3f9562b471e (diff) | |
ART: Relax java_vm_ext test
Bionic gives more than the requested stack size in some cases, see
change-id I7037ac8273ebe54dd19b1561c7a376819049124c. In that case,
attaching a thread with STACK_MIN may actually succeed.
Bug: 18908062
Change-Id: Ibb3f5c7a7399c01ec2032a133896cf91327370ed
Diffstat (limited to 'runtime/java_vm_ext_test.cc')
| -rw-r--r-- | runtime/java_vm_ext_test.cc | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/runtime/java_vm_ext_test.cc b/runtime/java_vm_ext_test.cc index 60c6a5c23a..2cbfa81b91 100644 --- a/runtime/java_vm_ext_test.cc +++ b/runtime/java_vm_ext_test.cc @@ -69,7 +69,12 @@ static void* attach_current_thread_callback(void* arg ATTRIBUTE_UNUSED) { } else { ok = vms_buf[0]->AttachCurrentThreadAsDaemon(&env, nullptr); } - EXPECT_EQ(gSmallStack ? JNI_ERR : JNI_OK, ok); + // TODO: Find a way to test with exact SMALL_STACK value, for which we would bail. The pthreads + // spec says that the stack size argument is a lower bound, and bionic currently gives us + // a chunk more on arm64. + if (!gSmallStack) { + EXPECT_EQ(JNI_OK, ok); + } if (ok == JNI_OK) { ok = vms_buf[0]->DetachCurrentThread(); EXPECT_EQ(JNI_OK, ok); |