Revert "Fix run-test check for --jvmti-redefine-stress"

This reverts commit d9e355921fb2f039c3a19a8cf23d78ab87c1f390.

Reason for revert: test breakage b/255291233

Change-Id: Ic611d5705e210f10a410ecd76f0650b96ad75fb2
diff --git a/test/1953-pop-frame/check b/test/1953-pop-frame/check
index a3b6fa6..65e96ff 100755
--- a/test/1953-pop-frame/check
+++ b/test/1953-pop-frame/check
@@ -23,8 +23,6 @@
 # The RI has restrictions and bugs around some PopFrame behavior that ART lacks.
 # See b/116003018. Some configurations cannot handle the class load events in
 # quite the right way so they are disabled there too.
-if [[ "$TEST_RUNTIME" == "jvm" || \
-      "$VERIFY_SOFT_FAIL" == "true" || \
-      ("$JVMTI_REDEFINE_STRESS" == "true" && "$RUN_MODE" == "host") ]]; then
-  patch -p0 expected-stdout.txt < jvm-expected.patch
+if [[ "$TEST_RUNTIME" != "jvm" && "x$VERIFY_SOFT_FAIL" != "xtrue" ]]; then
+  patch -p0 expected-stdout.txt < class-loading-expected.patch
 fi
diff --git a/test/1953-pop-frame/class-loading-expected.patch b/test/1953-pop-frame/class-loading-expected.patch
new file mode 100644
index 0000000..1a5eda7
--- /dev/null
+++ b/test/1953-pop-frame/class-loading-expected.patch
@@ -0,0 +1,36 @@
+36a37,50
+> Test stopped during notifyFramePop without exception on pop of calledFunction
+> Single call with PopFrame on StandardTestObject { cnt: 0 } base-call-count: 0
+> result is StandardTestObject { cnt: 2 } base-call count: 1
+> Test stopped during notifyFramePop without exception on pop of doNothing
+> Single call with PopFrame on StandardTestObject { cnt: 0 } base-call-count: 0
+> result is StandardTestObject { cnt: 1 } base-call count: 1
+> Test stopped during notifyFramePop with exception on pop of calledFunction
+> Single call with PopFrame on ExceptionThrowTestObject { cnt: 0 } base-call-count: 0
+> art.Test1953$ExceptionThrowTestObject$TestError thrown and caught!
+> result is ExceptionThrowTestObject { cnt: 2 } base-call count: 1
+> Test stopped during notifyFramePop with exception on pop of doThrow
+> Single call with PopFrame on ExceptionCatchTestObject { cnt: 0 } base-call-count: 0
+> art.Test1953$ExceptionCatchTestObject$TestError caught in called function.
+> result is ExceptionCatchTestObject { cnt: 1 } base-call count: 1
+60a75,94
+> Test stopped during a ClassLoad event.
+> Single call with PopFrame on ClassLoadObject { cnt: 0, curClass: 0} base-call-count: 0
+> Failed to pop frame due to java.lang.RuntimeException: JVMTI_ERROR_OPAQUE_FRAME
+> 	art.Test1953.popFrame(Native Method)
+> 	art.Test1953.runTestOn(Test1953.java)
+> 	art.Test1953.runTestOn(Test1953.java)
+> 	art.Test1953.runTests(Test1953.java)
+> 	<Additional frames hidden>
+> TC0.foo == 1
+> result is ClassLoadObject { cnt: 1, curClass: 1} base-call count: 1
+> Test stopped during a ClassPrepare event.
+> Single call with PopFrame on ClassLoadObject { cnt: 0, curClass: 1} base-call-count: 0
+> Failed to pop frame due to java.lang.RuntimeException: JVMTI_ERROR_OPAQUE_FRAME
+> 	art.Test1953.popFrame(Native Method)
+> 	art.Test1953.runTestOn(Test1953.java)
+> 	art.Test1953.runTestOn(Test1953.java)
+> 	art.Test1953.runTests(Test1953.java)
+> 	<Additional frames hidden>
+> TC1.foo == 2
+> result is ClassLoadObject { cnt: 1, curClass: 2} base-call count: 1
diff --git a/test/1953-pop-frame/expected-stdout.txt b/test/1953-pop-frame/expected-stdout.txt
index e75ea64..dafc6b4 100644
--- a/test/1953-pop-frame/expected-stdout.txt
+++ b/test/1953-pop-frame/expected-stdout.txt
@@ -34,20 +34,6 @@
 Test stopped during Method Exit due to exception thrown in subroutine
 Single call with PopFrame on ExceptionOnceObject { cnt: 0, throwInSub: true } base-call-count: 0
 result is ExceptionOnceObject { cnt: 2, throwInSub: true } base-call count: 1
-Test stopped during notifyFramePop without exception on pop of calledFunction
-Single call with PopFrame on StandardTestObject { cnt: 0 } base-call-count: 0
-result is StandardTestObject { cnt: 2 } base-call count: 1
-Test stopped during notifyFramePop without exception on pop of doNothing
-Single call with PopFrame on StandardTestObject { cnt: 0 } base-call-count: 0
-result is StandardTestObject { cnt: 1 } base-call count: 1
-Test stopped during notifyFramePop with exception on pop of calledFunction
-Single call with PopFrame on ExceptionThrowTestObject { cnt: 0 } base-call-count: 0
-art.Test1953$ExceptionThrowTestObject$TestError thrown and caught!
-result is ExceptionThrowTestObject { cnt: 2 } base-call count: 1
-Test stopped during notifyFramePop with exception on pop of doThrow
-Single call with PopFrame on ExceptionCatchTestObject { cnt: 0 } base-call-count: 0
-art.Test1953$ExceptionCatchTestObject$TestError caught in called function.
-result is ExceptionCatchTestObject { cnt: 1 } base-call count: 1
 Test stopped during ExceptionCatch event of calledFunction (catch in called function, throw in called function)
 Single call with PopFrame on ExceptionThrowTestObject { cnt: 0 } base-call-count: 0
 art.Test1953$ExceptionThrowTestObject$TestError caught in same function.
@@ -72,26 +58,6 @@
 Single call with PopFrame on ExceptionThrowFarTestObject { cnt: 0 } base-call-count: 0
 art.Test1953$ExceptionThrowFarTestObject$TestError caught in same function.
 result is ExceptionThrowFarTestObject { cnt: 2 } base-call count: 1
-Test stopped during a ClassLoad event.
-Single call with PopFrame on ClassLoadObject { cnt: 0, curClass: 0} base-call-count: 0
-Failed to pop frame due to java.lang.RuntimeException: JVMTI_ERROR_OPAQUE_FRAME
-	art.Test1953.popFrame(Native Method)
-	art.Test1953.runTestOn(Test1953.java)
-	art.Test1953.runTestOn(Test1953.java)
-	art.Test1953.runTests(Test1953.java)
-	<Additional frames hidden>
-TC0.foo == 1
-result is ClassLoadObject { cnt: 1, curClass: 1} base-call count: 1
-Test stopped during a ClassPrepare event.
-Single call with PopFrame on ClassLoadObject { cnt: 0, curClass: 1} base-call-count: 0
-Failed to pop frame due to java.lang.RuntimeException: JVMTI_ERROR_OPAQUE_FRAME
-	art.Test1953.popFrame(Native Method)
-	art.Test1953.runTestOn(Test1953.java)
-	art.Test1953.runTestOn(Test1953.java)
-	art.Test1953.runTests(Test1953.java)
-	<Additional frames hidden>
-TC1.foo == 2
-result is ClassLoadObject { cnt: 1, curClass: 2} base-call count: 1
 Test stopped during random Suspend.
 Single call with PopFrame on SuspendSuddenlyObject { cnt: 0 } base-call-count: 0
 result is SuspendSuddenlyObject { cnt: 2 } base-call count: 1
diff --git a/test/1953-pop-frame/jvm-expected.patch b/test/1953-pop-frame/jvm-expected.patch
deleted file mode 100644
index 6539d56..0000000
--- a/test/1953-pop-frame/jvm-expected.patch
+++ /dev/null
@@ -1,36 +0,0 @@
-37,50d36
-< Test stopped during notifyFramePop without exception on pop of calledFunction
-< Single call with PopFrame on StandardTestObject { cnt: 0 } base-call-count: 0
-< result is StandardTestObject { cnt: 2 } base-call count: 1
-< Test stopped during notifyFramePop without exception on pop of doNothing
-< Single call with PopFrame on StandardTestObject { cnt: 0 } base-call-count: 0
-< result is StandardTestObject { cnt: 1 } base-call count: 1
-< Test stopped during notifyFramePop with exception on pop of calledFunction
-< Single call with PopFrame on ExceptionThrowTestObject { cnt: 0 } base-call-count: 0
-< art.Test1953$ExceptionThrowTestObject$TestError thrown and caught!
-< result is ExceptionThrowTestObject { cnt: 2 } base-call count: 1
-< Test stopped during notifyFramePop with exception on pop of doThrow
-< Single call with PopFrame on ExceptionCatchTestObject { cnt: 0 } base-call-count: 0
-< art.Test1953$ExceptionCatchTestObject$TestError caught in called function.
-< result is ExceptionCatchTestObject { cnt: 1 } base-call count: 1
-75,94d60
-< Test stopped during a ClassLoad event.
-< Single call with PopFrame on ClassLoadObject { cnt: 0, curClass: 0} base-call-count: 0
-< Failed to pop frame due to java.lang.RuntimeException: JVMTI_ERROR_OPAQUE_FRAME
-< 	art.Test1953.popFrame(Native Method)
-< 	art.Test1953.runTestOn(Test1953.java)
-< 	art.Test1953.runTestOn(Test1953.java)
-< 	art.Test1953.runTests(Test1953.java)
-< 	<Additional frames hidden>
-< TC0.foo == 1
-< result is ClassLoadObject { cnt: 1, curClass: 1} base-call count: 1
-< Test stopped during a ClassPrepare event.
-< Single call with PopFrame on ClassLoadObject { cnt: 0, curClass: 1} base-call-count: 0
-< Failed to pop frame due to java.lang.RuntimeException: JVMTI_ERROR_OPAQUE_FRAME
-< 	art.Test1953.popFrame(Native Method)
-< 	art.Test1953.runTestOn(Test1953.java)
-< 	art.Test1953.runTestOn(Test1953.java)
-< 	art.Test1953.runTests(Test1953.java)
-< 	<Additional frames hidden>
-< TC1.foo == 2
-< result is ClassLoadObject { cnt: 1, curClass: 2} base-call count: 1
diff --git a/test/1954-pop-frame-jit/check b/test/1954-pop-frame-jit/check
index a3b6fa6..d2d1843 100755
--- a/test/1954-pop-frame-jit/check
+++ b/test/1954-pop-frame-jit/check
@@ -23,8 +23,6 @@
 # The RI has restrictions and bugs around some PopFrame behavior that ART lacks.
 # See b/116003018. Some configurations cannot handle the class load events in
 # quite the right way so they are disabled there too.
-if [[ "$TEST_RUNTIME" == "jvm" || \
-      "$VERIFY_SOFT_FAIL" == "true" || \
-      ("$JVMTI_REDEFINE_STRESS" == "true" && "$RUN_MODE" == "host") ]]; then
+if [[ "$TEST_RUNTIME" == "jvm" || "x$VERIFY_SOFT_FAIL" == "xtrue" ]]; then
   patch -p0 expected-stdout.txt < jvm-expected.patch
 fi
diff --git a/test/1955-pop-frame-jit-called/check b/test/1955-pop-frame-jit-called/check
index a3b6fa6..d2d1843 100755
--- a/test/1955-pop-frame-jit-called/check
+++ b/test/1955-pop-frame-jit-called/check
@@ -23,8 +23,6 @@
 # The RI has restrictions and bugs around some PopFrame behavior that ART lacks.
 # See b/116003018. Some configurations cannot handle the class load events in
 # quite the right way so they are disabled there too.
-if [[ "$TEST_RUNTIME" == "jvm" || \
-      "$VERIFY_SOFT_FAIL" == "true" || \
-      ("$JVMTI_REDEFINE_STRESS" == "true" && "$RUN_MODE" == "host") ]]; then
+if [[ "$TEST_RUNTIME" == "jvm" || "x$VERIFY_SOFT_FAIL" == "xtrue" ]]; then
   patch -p0 expected-stdout.txt < jvm-expected.patch
 fi
diff --git a/test/1956-pop-frame-jit-calling/check b/test/1956-pop-frame-jit-calling/check
index a3b6fa6..d2d1843 100755
--- a/test/1956-pop-frame-jit-calling/check
+++ b/test/1956-pop-frame-jit-calling/check
@@ -23,8 +23,6 @@
 # The RI has restrictions and bugs around some PopFrame behavior that ART lacks.
 # See b/116003018. Some configurations cannot handle the class load events in
 # quite the right way so they are disabled there too.
-if [[ "$TEST_RUNTIME" == "jvm" || \
-      "$VERIFY_SOFT_FAIL" == "true" || \
-      ("$JVMTI_REDEFINE_STRESS" == "true" && "$RUN_MODE" == "host") ]]; then
+if [[ "$TEST_RUNTIME" == "jvm" || "x$VERIFY_SOFT_FAIL" == "xtrue" ]]; then
   patch -p0 expected-stdout.txt < jvm-expected.patch
 fi
diff --git a/test/1969-force-early-return-void/check b/test/1969-force-early-return-void/check
index 0619e49..2e0de80 100755
--- a/test/1969-force-early-return-void/check
+++ b/test/1969-force-early-return-void/check
@@ -23,7 +23,6 @@
 # The RI has restrictions and bugs around some PopFrame behavior that ART lacks.
 # See b/116003018. Some configurations cannot handle the class load events in
 # quite the right way so they are disabled there too.
-if [[ "$VERIFY_SOFT_FAIL" == "true" || \
-      ("$JVMTI_REDEFINE_STRESS" == "true" && "$RUN_MODE" == "host") ]]; then
-  patch -p0 expected-stdout.txt < jvm-expected.patch
+if [[ "$VERIFY_SOFT_FAIL" != "true" ]]; then
+  patch -p0 expected-stdout.txt < class-loading-expected.patch
 fi
diff --git a/test/1969-force-early-return-void/class-loading-expected.patch b/test/1969-force-early-return-void/class-loading-expected.patch
new file mode 100644
index 0000000..5e13595
--- /dev/null
+++ b/test/1969-force-early-return-void/class-loading-expected.patch
@@ -0,0 +1,35 @@
+178a179,212
+> Test stopped during class-load.
+> NORMAL RUN: Single call with no interference on (ID: 46) ClassLoadObject { cnt: 0, curClass: 0}
+> TC0.foo == 100
+> NORMAL RUN: result for (ID: 46) ClassLoadObject { cnt: 1, curClass: 1} on Test1969 target thread - 46
+> Single call with force-early-return on (ID: 47) ClassLoadObject { cnt: 0, curClass: 1}
+> Will force return of Test1969 target thread - 47
+> Failed to force-return due to java.lang.RuntimeException: JVMTI_ERROR_OPAQUE_FRAME
+> 	art.NonStandardExit.forceEarlyReturnVoid(Native Method)
+> 	art.Test1969$TestSuspender.performForceReturn(Test1969.java)
+> 	art.Test1969.runTestOn(Test1969.java)
+> 	art.Test1969.runTestOn(Test1969.java)
+> 	art.Test1969.runTestOn(Test1969.java)
+> 	art.Test1969.runTests(Test1969.java)
+> 	<Additional frames hidden>
+> 
+> TC1.foo == 201
+> result for (ID: 47) ClassLoadObject { cnt: 1, curClass: 2} on Test1969 target thread - 47
+> Test stopped during class-load.
+> NORMAL RUN: Single call with no interference on (ID: 48) ClassLoadObject { cnt: 0, curClass: 2}
+> TC2.foo == 302
+> NORMAL RUN: result for (ID: 48) ClassLoadObject { cnt: 1, curClass: 3} on Test1969 target thread - 48
+> Single call with force-early-return on (ID: 49) ClassLoadObject { cnt: 0, curClass: 3}
+> Will force return of Test1969 target thread - 49
+> Failed to force-return due to java.lang.RuntimeException: JVMTI_ERROR_OPAQUE_FRAME
+> 	art.NonStandardExit.forceEarlyReturnVoid(Native Method)
+> 	art.Test1969$TestSuspender.performForceReturn(Test1969.java)
+> 	art.Test1969.runTestOn(Test1969.java)
+> 	art.Test1969.runTestOn(Test1969.java)
+> 	art.Test1969.runTestOn(Test1969.java)
+> 	art.Test1969.runTests(Test1969.java)
+> 	<Additional frames hidden>
+> 
+> TC3.foo == 403
+> result for (ID: 49) ClassLoadObject { cnt: 1, curClass: 4} on Test1969 target thread - 49
diff --git a/test/1969-force-early-return-void/expected-stdout.txt b/test/1969-force-early-return-void/expected-stdout.txt
index 1bb3252..fc685b4 100644
--- a/test/1969-force-early-return-void/expected-stdout.txt
+++ b/test/1969-force-early-return-void/expected-stdout.txt
@@ -176,37 +176,3 @@
 Single call with force-early-return on (ID: 45) ObjectInitTestObject { cnt: 0 }
 Will force return of Test1969 target thread - 45
 result for (ID: 45) ObjectInitTestObject { cnt: 1 } on Test1969 target thread - 45
-Test stopped during class-load.
-NORMAL RUN: Single call with no interference on (ID: 46) ClassLoadObject { cnt: 0, curClass: 0}
-TC0.foo == 100
-NORMAL RUN: result for (ID: 46) ClassLoadObject { cnt: 1, curClass: 1} on Test1969 target thread - 46
-Single call with force-early-return on (ID: 47) ClassLoadObject { cnt: 0, curClass: 1}
-Will force return of Test1969 target thread - 47
-Failed to force-return due to java.lang.RuntimeException: JVMTI_ERROR_OPAQUE_FRAME
-	art.NonStandardExit.forceEarlyReturnVoid(Native Method)
-	art.Test1969$TestSuspender.performForceReturn(Test1969.java)
-	art.Test1969.runTestOn(Test1969.java)
-	art.Test1969.runTestOn(Test1969.java)
-	art.Test1969.runTestOn(Test1969.java)
-	art.Test1969.runTests(Test1969.java)
-	<Additional frames hidden>
-
-TC1.foo == 201
-result for (ID: 47) ClassLoadObject { cnt: 1, curClass: 2} on Test1969 target thread - 47
-Test stopped during class-load.
-NORMAL RUN: Single call with no interference on (ID: 48) ClassLoadObject { cnt: 0, curClass: 2}
-TC2.foo == 302
-NORMAL RUN: result for (ID: 48) ClassLoadObject { cnt: 1, curClass: 3} on Test1969 target thread - 48
-Single call with force-early-return on (ID: 49) ClassLoadObject { cnt: 0, curClass: 3}
-Will force return of Test1969 target thread - 49
-Failed to force-return due to java.lang.RuntimeException: JVMTI_ERROR_OPAQUE_FRAME
-	art.NonStandardExit.forceEarlyReturnVoid(Native Method)
-	art.Test1969$TestSuspender.performForceReturn(Test1969.java)
-	art.Test1969.runTestOn(Test1969.java)
-	art.Test1969.runTestOn(Test1969.java)
-	art.Test1969.runTestOn(Test1969.java)
-	art.Test1969.runTests(Test1969.java)
-	<Additional frames hidden>
-
-TC3.foo == 403
-result for (ID: 49) ClassLoadObject { cnt: 1, curClass: 4} on Test1969 target thread - 49
diff --git a/test/1969-force-early-return-void/jvm-expected.patch b/test/1969-force-early-return-void/jvm-expected.patch
deleted file mode 100644
index d018239..0000000
--- a/test/1969-force-early-return-void/jvm-expected.patch
+++ /dev/null
@@ -1,35 +0,0 @@
-179,212d178
-< Test stopped during class-load.
-< NORMAL RUN: Single call with no interference on (ID: 46) ClassLoadObject { cnt: 0, curClass: 0}
-< TC0.foo == 100
-< NORMAL RUN: result for (ID: 46) ClassLoadObject { cnt: 1, curClass: 1} on Test1969 target thread - 46
-< Single call with force-early-return on (ID: 47) ClassLoadObject { cnt: 0, curClass: 1}
-< Will force return of Test1969 target thread - 47
-< Failed to force-return due to java.lang.RuntimeException: JVMTI_ERROR_OPAQUE_FRAME
-< 	art.NonStandardExit.forceEarlyReturnVoid(Native Method)
-< 	art.Test1969$TestSuspender.performForceReturn(Test1969.java)
-< 	art.Test1969.runTestOn(Test1969.java)
-< 	art.Test1969.runTestOn(Test1969.java)
-< 	art.Test1969.runTestOn(Test1969.java)
-< 	art.Test1969.runTests(Test1969.java)
-< 	<Additional frames hidden>
-< 
-< TC1.foo == 201
-< result for (ID: 47) ClassLoadObject { cnt: 1, curClass: 2} on Test1969 target thread - 47
-< Test stopped during class-load.
-< NORMAL RUN: Single call with no interference on (ID: 48) ClassLoadObject { cnt: 0, curClass: 2}
-< TC2.foo == 302
-< NORMAL RUN: result for (ID: 48) ClassLoadObject { cnt: 1, curClass: 3} on Test1969 target thread - 48
-< Single call with force-early-return on (ID: 49) ClassLoadObject { cnt: 0, curClass: 3}
-< Will force return of Test1969 target thread - 49
-< Failed to force-return due to java.lang.RuntimeException: JVMTI_ERROR_OPAQUE_FRAME
-< 	art.NonStandardExit.forceEarlyReturnVoid(Native Method)
-< 	art.Test1969$TestSuspender.performForceReturn(Test1969.java)
-< 	art.Test1969.runTestOn(Test1969.java)
-< 	art.Test1969.runTestOn(Test1969.java)
-< 	art.Test1969.runTestOn(Test1969.java)
-< 	art.Test1969.runTests(Test1969.java)
-< 	<Additional frames hidden>
-< 
-< TC3.foo == 403
-< result for (ID: 49) ClassLoadObject { cnt: 1, curClass: 4} on Test1969 target thread - 49
diff --git a/test/run-test b/test/run-test
index a3bf4d5..70c9b97 100755
--- a/test/run-test
+++ b/test/run-test
@@ -189,7 +189,6 @@
       target_mode = "no"
       DEX_LOCATION = tmp_dir
       run_args += ["--host"]
-      os.environ["RUN_MODE"] = "host"
       shift()
     elif arg == "--quiet":
       quiet = "yes"
@@ -258,19 +257,15 @@
       shift()
     elif arg == "--jvmti-step-stress":
       jvmti_step_stress = "true"
-      os.environ["JVMTI_STEP_STRESS"] = "true"
       shift()
     elif arg == "--jvmti-redefine-stress":
       jvmti_redefine_stress = "true"
-      os.environ["JVMTI_REDEFINE_STRESS"] = "true"
       shift()
     elif arg == "--jvmti-field-stress":
       jvmti_field_stress = "true"
-      os.environ["JVMTI_FIELD_STRESS"] = "true"
       shift()
     elif arg == "--jvmti-trace-stress":
       jvmti_trace_stress = "true"
-      os.environ["JVMTI_TRACE_STRESS"] = "true"
       shift()
     elif arg == "--suspend-timeout":
       shift()