summaryrefslogtreecommitdiff
path: root/tests/dl_test.cpp
diff options
context:
space:
mode:
authorAndroid Build Coastguard Worker <android-build-coastguard-worker@google.com>2021-06-29 16:22:10 +0000
committerAndroid Build Coastguard Worker <android-build-coastguard-worker@google.com>2021-06-29 16:22:10 +0000
commitc0fa380b2a08a30c323b26ed749495b1f36d8be6 (patch)
tree3d942a3ac6295515b8e322cd5d6ac6a7dc81bb09 /tests/dl_test.cpp
parentaf1f724947d8a37c13e6e7163ba35481b8ba4dcc (diff)
parent5af6b7975694b08e8e363e9435990f248fbb39ca (diff)
Snap for 7441201 from 5af6b7975694b08e8e363e9435990f248fbb39ca to s-keystone-qcom-release
Change-Id: Ia74024ee27474e3df8196cf7de426c84561361dd
Diffstat (limited to 'tests/dl_test.cpp')
-rw-r--r--tests/dl_test.cpp15
1 files changed, 6 insertions, 9 deletions
diff --git a/tests/dl_test.cpp b/tests/dl_test.cpp
index 47bf13374..766f27a0b 100644
--- a/tests/dl_test.cpp
+++ b/tests/dl_test.cpp
@@ -264,11 +264,8 @@ static void create_ld_config_file(const char* config_file) {
#endif
#if defined(__BIONIC__)
-// This test can't rely on ro.debuggable, because it might have been forced on
-// in a user build ("Force Debuggable"). In that configuration, ro.debuggable is
-// true, but Bionic's LD_CONFIG_FILE testing support is still disabled.
-static bool is_user_build() {
- return android::base::GetProperty("ro.build.type", "user") == std::string("user");
+static bool is_debuggable_build() {
+ return android::base::GetBoolProperty("ro.debuggable", false);
}
#endif
@@ -285,7 +282,7 @@ static bool is_user_build() {
TEST(dl, exec_with_ld_config_file) {
#if defined(__BIONIC__)
SKIP_WITH_HWASAN << "libclang_rt.hwasan is not found with custom ld config";
- if (is_user_build()) {
+ if (!is_debuggable_build()) {
GTEST_SKIP() << "LD_CONFIG_FILE is not supported on user build";
}
std::string helper = GetTestlibRoot() +
@@ -322,7 +319,7 @@ TEST(dl, exec_with_ld_config_file) {
TEST(dl, exec_with_ld_config_file_with_ld_preload) {
#if defined(__BIONIC__)
SKIP_WITH_HWASAN << "libclang_rt.hwasan is not found with custom ld config";
- if (is_user_build()) {
+ if (!is_debuggable_build()) {
GTEST_SKIP() << "LD_CONFIG_FILE is not supported on user build";
}
std::string helper = GetTestlibRoot() +
@@ -359,8 +356,8 @@ TEST(dl, disable_ld_config_file) {
// This test is only for CTS.
GTEST_SKIP() << "test is not supported with root uid";
}
- if (!is_user_build()) {
- GTEST_SKIP() << "test requires user build";
+ if (is_debuggable_build()) {
+ GTEST_SKIP() << "test is not supported on debuggable build";
}
std::string error_message = std::string("CANNOT LINK EXECUTABLE ") +