ART: Refactor JVMTI run tests

In preparation for code deduplication with CTS.

Bug: 32072923
Test: m
Change-Id: Ibbe005c94252bd29eae7f88aad301b0b20ddb80d
diff --git a/test/928-jni-table/jni_table.cc b/test/928-jni-table/jni_table.cc
index b5c0efd..3f4a93e 100644
--- a/test/928-jni-table/jni_table.cc
+++ b/test/928-jni-table/jni_table.cc
@@ -22,8 +22,9 @@
 #include "base/logging.h"
 #include "base/macros.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 Test927JNITable {
@@ -42,14 +43,14 @@
     JNIEnv* env, jclass klass) {
   // Get the current table, as the delegate.
   jvmtiError getorig_result = jvmti_env->GetJNIFunctionTable(&gOriginalEnv);
-  if (JvmtiErrorToException(env, getorig_result)) {
+  if (JvmtiErrorToException(env, jvmti_env, getorig_result)) {
     return;
   }
 
   // Get the current table, as the override we'll install.
   JNINativeInterface* env_override;
   jvmtiError getoverride_result = jvmti_env->GetJNIFunctionTable(&env_override);
-  if (JvmtiErrorToException(env, getoverride_result)) {
+  if (JvmtiErrorToException(env, jvmti_env, getoverride_result)) {
     return;
   }
 
@@ -58,7 +59,7 @@
 
   // Install the override.
   jvmtiError setoverride_result = jvmti_env->SetJNIFunctionTable(env_override);
-  if (JvmtiErrorToException(env, setoverride_result)) {
+  if (JvmtiErrorToException(env, jvmti_env, setoverride_result)) {
     return;
   }
 
@@ -68,7 +69,7 @@
 
   // Install the "original." There is no real reset.
   jvmtiError setoverride2_result = jvmti_env->SetJNIFunctionTable(gOriginalEnv);
-  if (JvmtiErrorToException(env, setoverride2_result)) {
+  if (JvmtiErrorToException(env, jvmti_env, setoverride2_result)) {
     return;
   }