Merge "method_verifier_test: Allow soft verifier failures for java/lang/invoke.*"
diff --git a/runtime/verifier/method_verifier_test.cc b/runtime/verifier/method_verifier_test.cc
index 837ee2d..52be2df 100644
--- a/runtime/verifier/method_verifier_test.cc
+++ b/runtime/verifier/method_verifier_test.cc
@@ -23,6 +23,7 @@
#include "common_runtime_test.h"
#include "dex_file.h"
#include "scoped_thread_state_change-inl.h"
+#include "utils.h"
#include "verifier_log_mode.h"
namespace art {
@@ -40,7 +41,14 @@
std::string error_msg;
MethodVerifier::FailureKind failure = MethodVerifier::VerifyClass(
self, klass, nullptr, true, HardFailLogMode::kLogWarning, &error_msg);
- ASSERT_TRUE(failure == MethodVerifier::kNoFailure) << error_msg;
+
+ if (StartsWith(descriptor, "Ljava/lang/invoke")) {
+ ASSERT_TRUE(failure == MethodVerifier::kSoftFailure ||
+ failure == MethodVerifier::kNoFailure) << error_msg;
+
+ } else {
+ ASSERT_TRUE(failure == MethodVerifier::kNoFailure) << error_msg;
+ }
}
void VerifyDexFile(const DexFile& dex)