Relax the error message check

Bug: http://b/27556691
Change-Id: I25dc4985b29555c9fe0cde9ce237ae34c693032d
diff --git a/tests/tests/jni/libjnitest/android_jni_cts_LinkerNamespacesTest.cpp b/tests/tests/jni/libjnitest/android_jni_cts_LinkerNamespacesTest.cpp
index acc3b98..cf3b7e7 100644
--- a/tests/tests/jni/libjnitest/android_jni_cts_LinkerNamespacesTest.cpp
+++ b/tests/tests/jni/libjnitest/android_jni_cts_LinkerNamespacesTest.cpp
@@ -146,7 +146,8 @@
         // Check the error message
         std::string err = dlerror();
 
-        if (err != "dlopen failed: library \"" + path + "\" is not accessible for the namespace \"classloader-namespace\"") {
+        if (err.find("dlopen failed: library \"" + path + "\"") != 0 ||
+            err.find("is not accessible for the namespace \"classloader-namespace\"") == std::string::npos) {
           *error_msg = "unexpected dlerror: " + err;
           return false;
         }