summaryrefslogtreecommitdiff
path: root/runtime/common_runtime_test.cc
diff options
context:
space:
mode:
author Alex Light <allight@google.com> 2016-06-07 10:34:46 -0700
committer Alex Light <allight@google.com> 2016-06-08 11:00:22 -0700
commit340f486aa0126facb67494449b5c2ee46a1a75e6 (patch)
tree340664c098b4894ad58dc8aa5399fd007ebb8549 /runtime/common_runtime_test.cc
parent83968f1a0949972e728d2302a26f9ae98dff34b2 (diff)
Revert "Revert "Revert "Revert some flaky unloading"""
Ensure that all threads are in the JNI code before destroying the runtime. Bug: 28406866 This reverts commit b2716bbf321293ddbd0b96f0ea999794b0e9b09b. Change-Id: I7f6189a9d0d8a1bf7af5535026804bc2183466c9
Diffstat (limited to 'runtime/common_runtime_test.cc')
-rw-r--r--runtime/common_runtime_test.cc20
1 files changed, 0 insertions, 20 deletions
diff --git a/runtime/common_runtime_test.cc b/runtime/common_runtime_test.cc
index f58af5a8da..5bdb36cafc 100644
--- a/runtime/common_runtime_test.cc
+++ b/runtime/common_runtime_test.cc
@@ -418,26 +418,6 @@ void CommonRuntimeTestImpl::TearDown() {
(*icu_cleanup_fn)();
Runtime::Current()->GetHeap()->VerifyHeap(); // Check for heap corruption after the test
-
- // Manually closing the JNI libraries.
- // Runtime does not support repeatedly doing JNI->CreateVM, thus we need to manually clean up the
- // dynamic linking loader so that gtests would not fail.
- // Bug: 25785594
- if (runtime_->IsStarted()) {
- {
- // We retrieve the handle by calling dlopen on the library. To close it, we need to call
- // dlclose twice, the first time to undo our dlopen and the second time to actually unload it.
- // See man dlopen.
- void* handle = dlopen("libjavacore.so", RTLD_LAZY);
- dlclose(handle);
- CHECK_EQ(0, dlclose(handle));
- }
- {
- void* handle = dlopen("libopenjdkd.so", RTLD_LAZY);
- dlclose(handle);
- CHECK_EQ(0, dlclose(handle));
- }
- }
}
static std::string GetDexFileName(const std::string& jar_prefix, bool host) {