Merge "Make atexit.dlclose work for glibc"
diff --git a/tests/Android.mk b/tests/Android.mk
index b75964a..db8dd8c 100644
--- a/tests/Android.mk
+++ b/tests/Android.mk
@@ -312,8 +312,10 @@
     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
 
 # -----------------------------------------------------------------------------
diff --git a/tests/atexit_test.cpp b/tests/atexit_test.cpp
index 797231f..e01220e 100644
--- a/tests/atexit_test.cpp
+++ b/tests/atexit_test.cpp
@@ -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 @@
   // 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 {
diff --git a/tests/atexit_testlib.cpp b/tests/atexit_testlib.cpp
index 1fefdf0..d35f57b 100644
--- a/tests/atexit_testlib.cpp
+++ b/tests/atexit_testlib.cpp
@@ -71,6 +71,5 @@
   atexit_valid_this_in_static_dtor = valid_this_in_static_dtor;
   atexit(atexit_handler_regular);
   atexit(atexit_handler_with_atexit);
-  atexit(NULL);
 }