Enable dlfcn.dt_runpath_absolute_path in glibc tests
dlfcn.dt_runpath_absolute_path no longer fails when
running bionic-unit-tests on glibc
Bug: http://b/25320359
Test: bionic-unit-tests-glibc --gtest_filter=dlfcn.dt*
Change-Id: Ia0ecf43293cb0fed28516fd8cb87e7f5f2d6e648
diff --git a/tests/dlfcn_test.cpp b/tests/dlfcn_test.cpp
index 5d3985f..1e2b6c9 100644
--- a/tests/dlfcn_test.cpp
+++ b/tests/dlfcn_test.cpp
@@ -1271,6 +1271,21 @@
dlclose(handle);
}
+TEST(dlfcn, dt_runpath_absolute_path) {
+ std::string libpath = get_testlib_root() + "/libtest_dt_runpath_d.so";
+ void* handle = dlopen(libpath.c_str(), RTLD_NOW);
+ ASSERT_TRUE(handle != nullptr) << dlerror();
+
+ typedef void *(* dlopen_b_fn)();
+ dlopen_b_fn fn = (dlopen_b_fn)dlsym(handle, "dlopen_b");
+ ASSERT_TRUE(fn != nullptr) << dlerror();
+
+ void *p = fn();
+ ASSERT_TRUE(p != nullptr);
+
+ dlclose(handle);
+}
+
TEST(dlfcn, RTLD_macros) {
#if !defined(RTLD_LOCAL)
#error no RTLD_LOCAL
@@ -1368,21 +1383,6 @@
#endif // defined(__arm__)
-TEST(dlfcn, dt_runpath_absolute_path) {
- std::string libpath = get_testlib_root() + "/libtest_dt_runpath_d.so";
- void* handle = dlopen(libpath.c_str(), RTLD_NOW);
- ASSERT_TRUE(handle != nullptr) << dlerror();
-
- typedef void *(* dlopen_b_fn)();
- dlopen_b_fn fn = (dlopen_b_fn)dlsym(handle, "dlopen_b");
- ASSERT_TRUE(fn != nullptr) << dlerror();
-
- void *p = fn();
- ASSERT_TRUE(p != nullptr);
-
- dlclose(handle);
-}
-
TEST(dlfcn, dlopen_invalid_rw_load_segment) {
const std::string libpath = get_testlib_root() +
"/" + kPrebuiltElfDir +