From 6612d7a34768484eb002c07a1c7df1bd85c0997a Mon Sep 17 00:00:00 2001 From: Dmitriy Ivanov Date: Fri, 24 Apr 2015 16:26:03 -0700 Subject: [PATCH] Enable dlsym_df_1_global test for arm/arm64 Change-Id: I1fdebced93175cb14053e2239e79f97239fc2dc2 --- tests/Android.mk | 2 -- tests/dlfcn_test.cpp | 4 ---- tests/libs/Android.mk | 14 +++++--------- 3 files changed, 5 insertions(+), 15 deletions(-) diff --git a/tests/Android.mk b/tests/Android.mk index c94237593..cd65c10be 100644 --- a/tests/Android.mk +++ b/tests/Android.mk @@ -295,9 +295,7 @@ bionic-unit-tests_shared_libraries_target := \ # which bionic does not support. Reenable this once this question is resolved. bionic-unit-tests_clang_target := false -ifneq ($(filter $(TARGET_ARCH),arm arm64),$(TARGET_ARCH)) bionic-unit-tests_shared_libraries_target += libdl_test_df_1_global -endif module := bionic-unit-tests module_tag := optional diff --git a/tests/dlfcn_test.cpp b/tests/dlfcn_test.cpp index 1023644c0..6b1f10958 100644 --- a/tests/dlfcn_test.cpp +++ b/tests/dlfcn_test.cpp @@ -626,7 +626,6 @@ TEST(dlfcn, dlopen_nodelete_dt_flags_1) { } TEST(dlfcn, dlsym_df_1_global) { -#if !defined(__arm__) && !defined(__aarch64__) void* handle = dlopen("libtest_dlsym_df_1_global.so", RTLD_NOW); ASSERT_TRUE(handle != nullptr) << dlerror(); int (*get_answer)(); @@ -634,9 +633,6 @@ TEST(dlfcn, dlsym_df_1_global) { ASSERT_TRUE(get_answer != nullptr) << dlerror(); ASSERT_EQ(42, get_answer()); ASSERT_EQ(0, dlclose(handle)); -#else - GTEST_LOG_(INFO) << "This test does nothing on arm/arm64 (to be reenabled once b/18137520 or b/18130452 are fixed).\n"; -#endif } TEST(dlfcn, dlopen_failure) { diff --git a/tests/libs/Android.mk b/tests/libs/Android.mk index 3d5b060de..cd6709a59 100644 --- a/tests/libs/Android.mk +++ b/tests/libs/Android.mk @@ -348,17 +348,13 @@ include $(LOCAL_PATH)/Android.build.testlib.mk # Library with DF_1_GLOBAL # ----------------------------------------------------------------------------- libdl_test_df_1_global_src_files := dl_df_1_global.cpp -libdl_test_df_1_global_ldflags := -fuse-ld=bfd -Wl,-z,global +libdl_test_df_1_global_ldflags := -Wl,-z,global +# TODO (dimitry): host ld.gold does not yet support -z global +# remove this line once it is updated. +libdl_test_df_1_global_ldflags_host := -fuse-ld=bfd + module := libdl_test_df_1_global -# TODO: re-enable arm once b/18137520 or b/18130452 are fixed -ifeq ($(filter $(TARGET_ARCH),arm arm64),) include $(LOCAL_PATH)/Android.build.testlib.mk -else -# build it for host only -build_target := SHARED_LIBRARY -build_type := host -include $(TEST_PATH)/Android.build.mk -endif # ----------------------------------------------------------------------------- # Library using symbol from libdl_test_df_1_global