ART: Refactor JVMTI run tests

In preparation for code deduplication with CTS.

Bug: 32072923
Test: m
Change-Id: Ibbe005c94252bd29eae7f88aad301b0b20ddb80d
diff --git a/test/929-search/search.cc b/test/929-search/search.cc
index ad7a053..bed4dfe 100644
--- a/test/929-search/search.cc
+++ b/test/929-search/search.cc
@@ -23,8 +23,9 @@
 #include "jvmti.h"
 #include "ScopedUtfChars.h"
 
-#include "ti-agent/common_helper.h"
-#include "ti-agent/common_load.h"
+// Test infrastructure
+#include "jvmti_helper.h"
+#include "test_env.h"
 
 namespace art {
 namespace Test929Search {
@@ -36,7 +37,7 @@
     return;
   }
   jvmtiError result = jvmti_env->AddToBootstrapClassLoaderSearch(utf.c_str());
-  JvmtiErrorToException(env, result);
+  JvmtiErrorToException(env, jvmti_env, result);
 }
 
 extern "C" JNIEXPORT void JNICALL Java_Main_addToSystemClassLoader(
@@ -46,7 +47,7 @@
     return;
   }
   jvmtiError result = jvmti_env->AddToSystemClassLoaderSearch(utf.c_str());
-  JvmtiErrorToException(env, result);
+  JvmtiErrorToException(env, jvmti_env, result);
 }
 
 }  // namespace Test929Search