am a59d22ef: am bd1ec44c: am 66b5e6b6: Merge "Do not run dlclose test on glibc."

* commit 'a59d22efce6f1a2003d8c54be72853e18f6315a0':
  Do not run dlclose test on glibc.
This commit is contained in:
Christopher Ferris 2014-05-31 00:50:18 +00:00 committed by Android Git Automerger
commit 9a545ee6d9

View File

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