Revert "Create test for field access in obsolete methods."

Fails on ndebug.

This reverts commit 322214405bf43684dbbde2fce549b2dad53fb04a.

Change-Id: I6a6c6c4bfb230eef1b7c4cb35f7e8051561d9e78
diff --git a/test/918-obsolete-fields/build b/test/918-obsolete-fields/build
deleted file mode 100755
index 898e2e5..0000000
--- a/test/918-obsolete-fields/build
+++ /dev/null
@@ -1,17 +0,0 @@
-#!/bin/bash
-#
-# Copyright 2016 The Android Open Source Project
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-#      http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-./default-build "$@" --experimental agents
diff --git a/test/918-obsolete-fields/expected.txt b/test/918-obsolete-fields/expected.txt
deleted file mode 100644
index 4caefc6..0000000
--- a/test/918-obsolete-fields/expected.txt
+++ /dev/null
@@ -1,21 +0,0 @@
-Pre Start private method call
-hello - private
-Post Start private method call
-Not doing anything here
-Pre Finish private method call
-goodbye - private
-Post Finish private method call
-Pre Start private method call
-hello - private
-Post Start private method call
-transforming calling function
-Pre Finish private method call
-Goodbye - private - Transformed
-Post Finish private method call
-pre Start private method call - Transformed
-Hello - private - Transformed
-post Start private method call - Transformed
-Not doing anything here
-pre Finish private method call - Transformed
-Goodbye - private - Transformed
-post Finish private method call - Transformed
diff --git a/test/918-obsolete-fields/info.txt b/test/918-obsolete-fields/info.txt
deleted file mode 100644
index 97739ca..0000000
--- a/test/918-obsolete-fields/info.txt
+++ /dev/null
@@ -1 +0,0 @@
-Tests obsolete method field access support
diff --git a/test/918-obsolete-fields/run b/test/918-obsolete-fields/run
deleted file mode 100755
index 4379349..0000000
--- a/test/918-obsolete-fields/run
+++ /dev/null
@@ -1,19 +0,0 @@
-#!/bin/bash
-#
-# Copyright 2016 The Android Open Source Project
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-#      http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-./default-run "$@" --experimental agents \
-                   --experimental runtime-plugins \
-                   --jvmti
diff --git a/test/918-obsolete-fields/src/Main.java b/test/918-obsolete-fields/src/Main.java
deleted file mode 100644
index a746032..0000000
--- a/test/918-obsolete-fields/src/Main.java
+++ /dev/null
@@ -1,157 +0,0 @@
-/*
- * Copyright (C) 2016 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-import java.util.function.Consumer;
-import java.util.Base64;
-
-public class Main {
-
-  // import java.util.function.Consumer;
-  //
-  // class Transform {
-  //   private Consumer<String> reporter;
-  //   public Transform(Consumer<String> reporter) {
-  //     this.reporter = reporter;
-  //   }
-  //
-  //   private void Start() {
-  //     reporter.accept("Hello - private - Transformed");
-  //   }
-  //
-  //   private void Finish() {
-  //     reporter.accept("Goodbye - private - Transformed");
-  //   }
-  //
-  //   public void sayHi(Runnable r) {
-  //     reporter.accept("pre Start private method call - Transformed");
-  //     Start();
-  //     reporter.accept("post Start private method call - Transformed");
-  //     r.run();
-  //     reporter.accept("pre Finish private method call - Transformed");
-  //     Finish();
-  //     reporter.accept("post Finish private method call - Transformed");
-  //   }
-  // }
-  private static final byte[] CLASS_BYTES = Base64.getDecoder().decode(
-    "yv66vgAAADQANAoADgAfCQANACAIACELACIAIwgAJAgAJQoADQAmCAAnCwAoACkIACoKAA0AKwgA" +
-    "LAcALQcALgEACHJlcG9ydGVyAQAdTGphdmEvdXRpbC9mdW5jdGlvbi9Db25zdW1lcjsBAAlTaWdu" +
-    "YXR1cmUBADFMamF2YS91dGlsL2Z1bmN0aW9uL0NvbnN1bWVyPExqYXZhL2xhbmcvU3RyaW5nOz47" +
-    "AQAGPGluaXQ+AQAgKExqYXZhL3V0aWwvZnVuY3Rpb24vQ29uc3VtZXI7KVYBAARDb2RlAQAPTGlu" +
-    "ZU51bWJlclRhYmxlAQA0KExqYXZhL3V0aWwvZnVuY3Rpb24vQ29uc3VtZXI8TGphdmEvbGFuZy9T" +
-    "dHJpbmc7PjspVgEABVN0YXJ0AQADKClWAQAGRmluaXNoAQAFc2F5SGkBABcoTGphdmEvbGFuZy9S" +
-    "dW5uYWJsZTspVgEAClNvdXJjZUZpbGUBAA5UcmFuc2Zvcm0uamF2YQwAEwAZDAAPABABAB1IZWxs" +
-    "byAtIHByaXZhdGUgLSBUcmFuc2Zvcm1lZAcALwwAMAAxAQAfR29vZGJ5ZSAtIHByaXZhdGUgLSBU" +
-    "cmFuc2Zvcm1lZAEAK3ByZSBTdGFydCBwcml2YXRlIG1ldGhvZCBjYWxsIC0gVHJhbnNmb3JtZWQM" +
-    "ABgAGQEALHBvc3QgU3RhcnQgcHJpdmF0ZSBtZXRob2QgY2FsbCAtIFRyYW5zZm9ybWVkBwAyDAAz" +
-    "ABkBACxwcmUgRmluaXNoIHByaXZhdGUgbWV0aG9kIGNhbGwgLSBUcmFuc2Zvcm1lZAwAGgAZAQAt" +
-    "cG9zdCBGaW5pc2ggcHJpdmF0ZSBtZXRob2QgY2FsbCAtIFRyYW5zZm9ybWVkAQAJVHJhbnNmb3Jt" +
-    "AQAQamF2YS9sYW5nL09iamVjdAEAG2phdmEvdXRpbC9mdW5jdGlvbi9Db25zdW1lcgEABmFjY2Vw" +
-    "dAEAFShMamF2YS9sYW5nL09iamVjdDspVgEAEmphdmEvbGFuZy9SdW5uYWJsZQEAA3J1bgAgAA0A" +
-    "DgAAAAEAAgAPABAAAQARAAAAAgASAAQAAQATABQAAgAVAAAAKgACAAIAAAAKKrcAASortQACsQAA" +
-    "AAEAFgAAAA4AAwAAABUABAAWAAkAFwARAAAAAgAXAAIAGAAZAAEAFQAAACgAAgABAAAADCq0AAIS" +
-    "A7kABAIAsQAAAAEAFgAAAAoAAgAAABoACwAbAAIAGgAZAAEAFQAAACgAAgABAAAADCq0AAISBbkA" +
-    "BAIAsQAAAAEAFgAAAAoAAgAAAB4ACwAfAAEAGwAcAAEAFQAAAG8AAgACAAAAOyq0AAISBrkABAIA" +
-    "KrcAByq0AAISCLkABAIAK7kACQEAKrQAAhIKuQAEAgAqtwALKrQAAhIMuQAEAgCxAAAAAQAWAAAA" +
-    "IgAIAAAAIgALACMADwAkABoAJQAgACYAKwAnAC8AKAA6ACkAAQAdAAAAAgAe");
-  private static final byte[] DEX_BYTES = Base64.getDecoder().decode(
-    "ZGV4CjAzNQAw/b59wCwTlSVDmuhPEezuK3oe0rtT4ujMBQAAcAAAAHhWNBIAAAAAAAAAAAgFAAAd" +
-    "AAAAcAAAAAYAAADkAAAABAAAAPwAAAABAAAALAEAAAcAAAA0AQAAAQAAAGwBAABABAAAjAEAAJoC" +
-    "AACdAgAAoAIAAKgCAACsAgAAsgIAALoCAADbAgAA+gIAAAcDAAAmAwAAOgMAAFADAABkAwAAggMA" +
-    "AKEDAACoAwAAuAMAALsDAAC/AwAAxwMAANsDAAAKBAAAOAQAAGYEAACTBAAAnQQAAKIEAACpBAAA" +
-    "CAAAAAkAAAAKAAAACwAAAA4AAAARAAAAEQAAAAUAAAAAAAAAEgAAAAUAAACEAgAAEgAAAAUAAACM" +
-    "AgAAEgAAAAUAAACUAgAAAAAEABkAAAAAAAMAAgAAAAAAAAAFAAAAAAAAAA8AAAAAAAIAGwAAAAIA" +
-    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aW5pc2ggcHJpdmF0ZSBtZXRob2QgY2FsbCAtIFRyYW5zZm9ybWVkACtwcmUgU3RhcnQgcHJp" +
-    "dmF0ZSBtZXRob2QgY2FsbCAtIFRyYW5zZm9ybWVkAAhyZXBvcnRlcgADcnVuAAVzYXlIaQAFdmFs" +
-    "dWUAFQEABw48LQAeAAcOhwAaAAcOhwAiAQAHDoc8hzyHPIcAAgEBHBwEFw0XARcMFwMCAQEcHAUX" +
-    "ABcNFwEXDBcEAAEDAQACAIGABJwDAQK4AwEC3AMDAYAEABAAAAAAAAAAAQAAAAAAAAABAAAAHQAA" +
-    "AHAAAAACAAAABgAAAOQAAAADAAAABAAAAPwAAAAEAAAAAQAAACwBAAAFAAAABwAAADQBAAAGAAAA" +
-    "AQAAAGwBAAADEAAAAgAAAIwBAAABIAAABAAAAJwBAAAGIAAAAQAAAGQCAAABEAAAAwAAAIQCAAAC" +
-    "IAAAHQAAAJoCAAADIAAABAAAALAEAAAEIAAAAgAAANEEAAAAIAAAAQAAAO8EAAAAEAAAAQAAAAgF" +
-    "AAA=");
-
-  // A class that we can use to keep track of the output of this test.
-  private static class TestWatcher implements Consumer<String> {
-    private StringBuilder sb;
-    public TestWatcher() {
-      sb = new StringBuilder();
-    }
-
-    @Override
-    public void accept(String s) {
-      sb.append(s);
-      sb.append('\n');
-    }
-
-    public String getOutput() {
-      return sb.toString();
-    }
-
-    public void clear() {
-      sb = new StringBuilder();
-    }
-  }
-
-  public static void main(String[] args) {
-    System.loadLibrary(args[1]);
-    TestWatcher w = new TestWatcher();
-    doTest(new Transform(w), w);
-  }
-
-  // TODO Workaround to (1) inability to ensure that current_method is not put into a register by
-  // the JIT and/or (2) inability to deoptimize frames near runtime functions.
-  // TODO Fix one/both of these issues.
-  public static void doCall(Runnable r) {
-      r.run();
-  }
-
-  private static boolean interpreting = true;
-  private static boolean retry = false;
-
-  public static void doTest(Transform t, TestWatcher w) {
-    Runnable do_redefinition = () -> {
-      w.accept("transforming calling function");
-      doCommonClassRedefinition(Transform.class, CLASS_BYTES, DEX_BYTES);
-    };
-    // This just prints something out to show we are running the Runnable.
-    Runnable say_nothing = () -> { w.accept("Not doing anything here"); };
-
-    // Try and redefine.
-    t.sayHi(say_nothing);
-    t.sayHi(do_redefinition);
-    t.sayHi(say_nothing);
-
-    // Print output of last run.
-    System.out.print(w.getOutput());
-  }
-
-  // Transforms the class
-  private static native void doCommonClassRedefinition(Class<?> target,
-                                                       byte[] classfile,
-                                                       byte[] dexfile);
-}
diff --git a/test/918-obsolete-fields/src/Transform.java b/test/918-obsolete-fields/src/Transform.java
deleted file mode 100644
index abd1d19..0000000
--- a/test/918-obsolete-fields/src/Transform.java
+++ /dev/null
@@ -1,47 +0,0 @@
-/*
- * Copyright (C) 2016 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-import java.util.function.Consumer;
-
-class Transform {
-  private Consumer<String> reporter;
-  public Transform(Consumer<String> reporter) {
-    this.reporter = reporter;
-  }
-
-  private void Start() {
-    reporter.accept("hello - private");
-  }
-
-  private void Finish() {
-    reporter.accept("goodbye - private");
-  }
-
-  public void sayHi(Runnable r) {
-    reporter.accept("Pre Start private method call");
-    Start();
-    reporter.accept("Post Start private method call");
-    // TODO Revist with b/33616143
-    // TODO Uncomment this
-    // r.run();
-    // TODO This is a very temporary fix until we get either deoptimization near runtime frames
-    // working, forcing current method to be always read from the stack or both working.
-    Main.doCall(r);
-    reporter.accept("Pre Finish private method call");
-    Finish();
-    reporter.accept("Post Finish private method call");
-  }
-}
diff --git a/test/Android.run-test.mk b/test/Android.run-test.mk
index 474e95d..56f7ed7 100644
--- a/test/Android.run-test.mk
+++ b/test/Android.run-test.mk
@@ -288,7 +288,6 @@
   915-obsolete-2 \
   916-obsolete-jit \
   917-fields-transformation \
-  918-obsolete-fields \
 
 ifneq (,$(filter target,$(TARGET_TYPES)))
   ART_TEST_KNOWN_BROKEN += $(call all-run-test-names,target,$(RUN_TYPES),$(PREBUILD_TYPES), \
diff --git a/test/ti-agent/common_load.cc b/test/ti-agent/common_load.cc
index 33619b9..79c17d7 100644
--- a/test/ti-agent/common_load.cc
+++ b/test/ti-agent/common_load.cc
@@ -70,7 +70,6 @@
   { "915-obsolete-2", common_redefine::OnLoad, nullptr },
   { "916-obsolete-jit", common_redefine::OnLoad, nullptr },
   { "917-fields-transformation", common_redefine::OnLoad, nullptr },
-  { "918-obsolete-fields", common_redefine::OnLoad, nullptr },
 };
 
 static AgentLib* FindAgent(char* name) {