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

This reverts commit f65c2475652326d89eba7bd8e1999c9bc0374c4f.

Reason for revert: Reland

Test: test.py -r --all-target --optimizing --64 --all-jvmti \
              -t 1953 -t 1954 -t 1955 -t 1956 -t 1969
Change-Id: I5db73738aaca76613ea28dbb84fabce5c5e4b423
diff --git a/test/1953-pop-frame/check b/test/1953-pop-frame/check
index 65e96ff..05ad8e5 100755
--- a/test/1953-pop-frame/check
+++ b/test/1953-pop-frame/check
@@ -23,6 +23,8 @@
 # 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" && "x$VERIFY_SOFT_FAIL" != "xtrue" ]]; then
+if [[ ! ("$TEST_RUNTIME" == "jvm" || \
+         "$VERIFY_SOFT_FAIL" == "true" || \
+         ("$JVMTI_REDEFINE_STRESS" == "true" && "$RUN_MODE" == "host")) ]]; then
   patch -p0 expected-stdout.txt < class-loading-expected.patch
 fi
diff --git a/test/1954-pop-frame-jit/check b/test/1954-pop-frame-jit/check
index d2d1843..a3b6fa6 100755
--- a/test/1954-pop-frame-jit/check
+++ b/test/1954-pop-frame-jit/check
@@ -23,6 +23,8 @@
 # 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" || "x$VERIFY_SOFT_FAIL" == "xtrue" ]]; then
+if [[ "$TEST_RUNTIME" == "jvm" || \
+      "$VERIFY_SOFT_FAIL" == "true" || \
+      ("$JVMTI_REDEFINE_STRESS" == "true" && "$RUN_MODE" == "host") ]]; 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 d2d1843..a3b6fa6 100755
--- a/test/1955-pop-frame-jit-called/check
+++ b/test/1955-pop-frame-jit-called/check
@@ -23,6 +23,8 @@
 # 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" || "x$VERIFY_SOFT_FAIL" == "xtrue" ]]; then
+if [[ "$TEST_RUNTIME" == "jvm" || \
+      "$VERIFY_SOFT_FAIL" == "true" || \
+      ("$JVMTI_REDEFINE_STRESS" == "true" && "$RUN_MODE" == "host") ]]; 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 d2d1843..a3b6fa6 100755
--- a/test/1956-pop-frame-jit-calling/check
+++ b/test/1956-pop-frame-jit-calling/check
@@ -23,6 +23,8 @@
 # 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" || "x$VERIFY_SOFT_FAIL" == "xtrue" ]]; then
+if [[ "$TEST_RUNTIME" == "jvm" || \
+      "$VERIFY_SOFT_FAIL" == "true" || \
+      ("$JVMTI_REDEFINE_STRESS" == "true" && "$RUN_MODE" == "host") ]]; 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 2e0de80..5549952 100755
--- a/test/1969-force-early-return-void/check
+++ b/test/1969-force-early-return-void/check
@@ -23,6 +23,7 @@
 # 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" ]]; then
+if [[ ! ("$VERIFY_SOFT_FAIL" == "true" || \
+         ("$JVMTI_REDEFINE_STRESS" == "true" && "$RUN_MODE" == "host")) ]]; then
   patch -p0 expected-stdout.txt < class-loading-expected.patch
 fi
diff --git a/test/run-test b/test/run-test
index 70c9b97..a3bf4d5 100755
--- a/test/run-test
+++ b/test/run-test
@@ -189,6 +189,7 @@
       target_mode = "no"
       DEX_LOCATION = tmp_dir
       run_args += ["--host"]
+      os.environ["RUN_MODE"] = "host"
       shift()
     elif arg == "--quiet":
       quiet = "yes"
@@ -257,15 +258,19 @@
       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()