Don't run disable_ld_config_file test on non-production devices

The test always fails when run on non-production devices. Silence the
expected failure.

Bug: 64908138
Test: run CtsBionicTestCases on userdebug device. disable_ld_config_file
test does not fail.

Merged-In: Icd24a356dfbc62f540e3263070434a4fd065bfbc
Change-Id: Icd24a356dfbc62f540e3263070434a4fd065bfbc
(cherry picked from commit 157655dc6785923740e334478c4e2f1a392bade4)
diff --git a/tests/dl_test.cpp b/tests/dl_test.cpp
index 857640a..aaf2c37 100644
--- a/tests/dl_test.cpp
+++ b/tests/dl_test.cpp
@@ -16,6 +16,10 @@
 
 #include <gtest/gtest.h>
 
+#if defined(__BIONIC__)
+#include <android-base/properties.h>
+#endif
+
 #include <dlfcn.h>
 #include <libgen.h>
 #include <limits.h>
@@ -226,6 +230,12 @@
     // This test is only for CTS.
     return;
   }
+  std::string build_type = android::base::GetProperty("ro.build.type", "user");
+  if (build_type == "userdebug" || build_type == "eng") {
+    // Skip the test for non production devices
+    return;
+  }
+
   std::string error_message = "CANNOT LINK EXECUTABLE \"" + get_testlib_root() + "/ld_config_test_helper/ld_config_test_helper\": library \"ld_config_test_helper_lib1.so\" not found\n";
   std::string helper = get_testlib_root() +
       "/ld_config_test_helper/ld_config_test_helper";