am 5f29c328: am 831405b7: Merge "Make atexit.dlclose work for glibc"

* commit '5f29c32844d8997d65a4ac8e8d9efa7903d6f83a':
  Make atexit.dlclose work for glibc
This commit is contained in:
Dmitriy Ivanov 2014-05-31 01:33:06 +00:00 committed by Android Git Automerger
commit 109e3b1613
3 changed files with 3 additions and 6 deletions

View File

@ -312,8 +312,10 @@ libtest_atexit_src_files := \
atexit_testlib.cpp
module := libtest_atexit
build_type := target
build_target := SHARED_LIBRARY
build_type := target
include $(LOCAL_PATH)/Android.build.mk
build_type := host
include $(LOCAL_PATH)/Android.build.mk
# -----------------------------------------------------------------------------

View File

@ -25,7 +25,6 @@
#include <string>
TEST(atexit, dlclose) {
#if defined(__BIONIC__)
std::string atexit_call_sequence;
bool valid_this_in_static_dtor = false;
void* handle = dlopen("libtest_atexit.so", RTLD_NOW);
@ -39,9 +38,6 @@ TEST(atexit, dlclose) {
// this test verifies atexit call from atexit handler. as well as the order of calls
ASSERT_EQ("Humpty Dumpty sat on a wall", atexit_call_sequence);
ASSERT_TRUE(valid_this_in_static_dtor);
#else // __BIONIC__
GTEST_LOG_(INFO) << "This test does nothing.";
#endif // __BIONIC__
}
class TestMainStaticDtorClass {

View File

@ -71,6 +71,5 @@ extern "C" void register_atexit(std::string* sequence, bool* valid_this_in_stati
atexit_valid_this_in_static_dtor = valid_this_in_static_dtor;
atexit(atexit_handler_regular);
atexit(atexit_handler_with_atexit);
atexit(NULL);
}