summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/021-string2/src/Main.java3
-rw-r--r--test/155-java-set-resolved-type/src/Main.java10
-rw-r--r--test/157-void-class/src/Main.java6
-rw-r--r--test/158-app-image-class-table/expected.txt1
-rw-r--r--test/158-app-image-class-table/info.txt3
-rw-r--r--test/158-app-image-class-table/profile0
-rw-r--r--test/158-app-image-class-table/run17
-rw-r--r--test/158-app-image-class-table/src/Main.java55
-rw-r--r--test/158-app-image-class-table/src/TestImplementation.java21
-rw-r--r--test/626-const-class-linking/clear_dex_cache_types.cc3
-rw-r--r--test/901-hello-ti-agent/basics.cc2
-rw-r--r--test/903-hello-tagging/tagging.cc2
-rw-r--r--test/904-object-allocation/tracking.cc2
-rw-r--r--test/905-object-free/tracking_free.cc2
-rw-r--r--test/906-iterate-heap/iterate_heap.cc2
-rw-r--r--test/907-get-loaded-classes/get_loaded_classes.cc2
-rw-r--r--test/908-gc-start-finish/gc_callbacks.cc2
-rw-r--r--test/909-attach-agent/attach.cc2
-rw-r--r--test/910-methods/methods.cc2
-rw-r--r--test/911-get-stack-trace/stack_trace.cc2
-rw-r--r--test/912-classes/classes.cc2
-rw-r--r--test/913-heaps/heaps.cc2
-rw-r--r--test/918-fields/fields.cc2
-rw-r--r--test/920-objects/objects.cc2
-rw-r--r--test/922-properties/properties.cc2
-rw-r--r--test/923-monitors/monitors.cc2
-rw-r--r--test/924-threads/threads.cc2
-rw-r--r--test/925-threadgroups/threadgroups.cc2
-rw-r--r--test/927-timers/timers.cc2
-rw-r--r--test/928-jni-table/jni_table.cc2
-rw-r--r--test/929-search/search.cc2
-rw-r--r--test/931-agent-thread/agent_thread.cc2
-rw-r--r--test/933-misc-events/misc_events.cc2
-rw-r--r--test/936-search-onload/search_onload.cc2
-rw-r--r--test/944-transform-classloaders/classloader.cc2
-rw-r--r--test/945-obsolete-native/obsolete_native.cc2
-rw-r--r--test/Android.bp1
-rw-r--r--test/knownfailures.json10
-rwxr-xr-xtest/testrunner/run_build_test_target.py16
-rw-r--r--test/testrunner/target_config.py24
-rwxr-xr-xtest/testrunner/testrunner.py13
-rw-r--r--test/ti-agent/common_helper.cc2
-rw-r--r--test/ti-agent/common_helper.h2
-rw-r--r--test/ti-agent/common_load.cc2
-rw-r--r--test/ti-agent/common_load.h3
45 files changed, 186 insertions, 58 deletions
diff --git a/test/021-string2/src/Main.java b/test/021-string2/src/Main.java
index 0dd82abf6f..194f4a1a7d 100644
--- a/test/021-string2/src/Main.java
+++ b/test/021-string2/src/Main.java
@@ -127,6 +127,9 @@ public class Main {
Assert.assertEquals("I", /* Small latin dotless i */ "\u0131".toUpperCase());
Assert.assertEquals("abc", "a\u0131c".replace('\u0131', 'b'));
Assert.assertEquals("a\u0131c", "abc".replace('b', '\u0131'));
+
+ // Regression test for scratch register exhaustion in String.equals() intrinsic on arm64.
+ Assert.assertFalse(result.equals("Very long constant string, so that the known constant count field cannot be embedded in a CMP immediate instruction on arm64. Since it can hold 12-bit values, optionally shifted left by 12, let's go somewhere over 2^12, i.e. 4096. That should trigger the bug with or without string compression. 0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ+/0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ+/0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ+/0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ+/0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ+/0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ+/0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ+/0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ+/0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ+/0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ+/0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ+/0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ+/0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ+/0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ+/0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ+/0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ+/0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ+/0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ+/0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ+/0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ+/0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ+/0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ+/0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ+/0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ+/0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ+/0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ+/0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ+/0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ+/0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ+/0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ+/0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ+/0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ+/0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ+/0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ+/0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ+/0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ+/0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ+/0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ+/0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ+/0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ+/0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ+/0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ+/0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ+/0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ+/0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ+/0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ+/0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ+/0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ+/0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ+/0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ+/0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ+/0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ+/0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ+/0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ+/0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ+/0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ+/0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ+/0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ+/0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ+/0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ+/0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ+/0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ+/0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ+/0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ+/"));
}
public static void testCompareToAndEquals() {
diff --git a/test/155-java-set-resolved-type/src/Main.java b/test/155-java-set-resolved-type/src/Main.java
index f92363e915..8f79bd7ecd 100644
--- a/test/155-java-set-resolved-type/src/Main.java
+++ b/test/155-java-set-resolved-type/src/Main.java
@@ -55,14 +55,10 @@ public class Main {
Class<?> timpl = Class.forName("TestImplementation", false, mainLoader);
// Clear the dex cache resolved types to force a proper lookup the next time
// we need to find TestInterface.
- // TODO: Enable clearing the dex cache when we switch to the hash-based type array
- // and do a proper lookup. Currently, ClassLinker fully relies on the DexCache.
- if (false) {
- clearResolvedTypes(timpl);
- }
+ clearResolvedTypes(timpl);
- // Force intialization of TestClass2. This expects the interface type to be
- // resolved and found through simple lookup.
+ // Force intialization of TestImplementation. This expects the interface type
+ // to be resolved and found through simple lookup.
timpl.newInstance();
} catch (Throwable t) {
t.printStackTrace();
diff --git a/test/157-void-class/src/Main.java b/test/157-void-class/src/Main.java
index 0a052e774d..322b705f1d 100644
--- a/test/157-void-class/src/Main.java
+++ b/test/157-void-class/src/Main.java
@@ -35,11 +35,7 @@ public class Main {
}
// Clear the resolved types of the ojluni dex file to make sure there is no entry
// for "V", i.e. void.
- // TODO: Enable clearing the dex cache when we switch to the hash-based type array
- // and do a proper lookup. Currently, ClassLinker fully relies on the DexCache.
- if (false) {
- clearResolvedTypes(Integer.class);
- }
+ clearResolvedTypes(Integer.class);
// With java.lang.Void being compile-time verified but uninitialized, initialize
// it now. Previously, this would indirectly initialize TYPE with the current,
// i.e. zero-initialized, value of TYPE. The only thing that could prevent the
diff --git a/test/158-app-image-class-table/expected.txt b/test/158-app-image-class-table/expected.txt
new file mode 100644
index 0000000000..6a5618ebc6
--- /dev/null
+++ b/test/158-app-image-class-table/expected.txt
@@ -0,0 +1 @@
+JNI_OnLoad called
diff --git a/test/158-app-image-class-table/info.txt b/test/158-app-image-class-table/info.txt
new file mode 100644
index 0000000000..c844c8ecd6
--- /dev/null
+++ b/test/158-app-image-class-table/info.txt
@@ -0,0 +1,3 @@
+Regression test for app image class table being erroneously omitted
+when it contains only boot image class loader classes while dex caches
+were written with references to these classes.
diff --git a/test/158-app-image-class-table/profile b/test/158-app-image-class-table/profile
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/test/158-app-image-class-table/profile
diff --git a/test/158-app-image-class-table/run b/test/158-app-image-class-table/run
new file mode 100644
index 0000000000..146e180000
--- /dev/null
+++ b/test/158-app-image-class-table/run
@@ -0,0 +1,17 @@
+#!/bin/bash
+#
+# Copyright (C) 2017 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.
+
+exec ${RUN} $@ --profile -Xcompiler-option --compiler-filter=speed-profile
diff --git a/test/158-app-image-class-table/src/Main.java b/test/158-app-image-class-table/src/Main.java
new file mode 100644
index 0000000000..804468fe91
--- /dev/null
+++ b/test/158-app-image-class-table/src/Main.java
@@ -0,0 +1,55 @@
+/*
+ * Copyright (C) 2017 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.
+ */
+
+public class Main {
+ public static String TEST_NAME = "158-app-image-class-table";
+
+ public static void main(String[] args) {
+ try {
+ Class<?> class_loader_class = Class.forName("dalvik.system.PathClassLoader");
+ System.loadLibrary(args[0]);
+ } catch (ClassNotFoundException e) {
+ usingRI = true;
+ // Add expected JNI_OnLoad log line to match expected.txt.
+ System.out.println("JNI_OnLoad called");
+ }
+ try {
+ // Resolve but do not initialize TestImplementation. During the resolution,
+ // we see the Cloneable in the dex cache, so we do not try to look it up
+ // or resolve it.
+ Class<?> timpl =
+ Class.forName("TestImplementation", false, Main.class.getClassLoader());
+ // Clear the dex cache resolved types to force a proper lookup the next time
+ // we need to find TestInterface.
+ clearResolvedTypes(timpl);
+ // Force intialization of TestImplementation. This expects the interface type
+ // to be resolved and found through simple lookup.
+ timpl.newInstance();
+ } catch (Throwable t) {
+ t.printStackTrace();
+ }
+ }
+
+ public static void clearResolvedTypes(Class<?> c) {
+ if (!usingRI) {
+ nativeClearResolvedTypes(c);
+ }
+ }
+
+ private static boolean usingRI = false;
+
+ public static native void nativeClearResolvedTypes(Class<?> c);
+}
diff --git a/test/158-app-image-class-table/src/TestImplementation.java b/test/158-app-image-class-table/src/TestImplementation.java
new file mode 100644
index 0000000000..558e58772f
--- /dev/null
+++ b/test/158-app-image-class-table/src/TestImplementation.java
@@ -0,0 +1,21 @@
+/*
+ * Copyright (C) 2017 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.
+ */
+
+public class TestImplementation implements Cloneable {
+ public Object clone() {
+ return new TestImplementation();
+ }
+}
diff --git a/test/626-const-class-linking/clear_dex_cache_types.cc b/test/626-const-class-linking/clear_dex_cache_types.cc
index b35dff48ee..e1af02edfd 100644
--- a/test/626-const-class-linking/clear_dex_cache_types.cc
+++ b/test/626-const-class-linking/clear_dex_cache_types.cc
@@ -27,7 +27,8 @@ extern "C" JNIEXPORT void JNICALL Java_Main_nativeClearResolvedTypes(JNIEnv*, jc
ScopedObjectAccess soa(Thread::Current());
mirror::DexCache* dex_cache = soa.Decode<mirror::Class>(cls)->GetDexCache();
for (size_t i = 0, num_types = dex_cache->NumResolvedTypes(); i != num_types; ++i) {
- dex_cache->SetResolvedType(dex::TypeIndex(i), ObjPtr<mirror::Class>(nullptr));
+ mirror::TypeDexCachePair cleared(nullptr, mirror::TypeDexCachePair::InvalidIndexForSlot(i));
+ dex_cache->GetResolvedTypes()[i].store(cleared, std::memory_order_relaxed);
}
}
diff --git a/test/901-hello-ti-agent/basics.cc b/test/901-hello-ti-agent/basics.cc
index 0b17656303..91662770be 100644
--- a/test/901-hello-ti-agent/basics.cc
+++ b/test/901-hello-ti-agent/basics.cc
@@ -20,7 +20,7 @@
#include <stdio.h>
#include <string.h>
#include "base/macros.h"
-#include "openjdkjvmti/jvmti.h"
+#include "jvmti.h"
#include "ti-agent/common_helper.h"
#include "ti-agent/common_load.h"
diff --git a/test/903-hello-tagging/tagging.cc b/test/903-hello-tagging/tagging.cc
index 6177263cd2..b85ed48930 100644
--- a/test/903-hello-tagging/tagging.cc
+++ b/test/903-hello-tagging/tagging.cc
@@ -25,7 +25,7 @@
#include "art_method-inl.h"
#include "base/logging.h"
-#include "openjdkjvmti/jvmti.h"
+#include "jvmti.h"
#include "ti-agent/common_helper.h"
#include "ti-agent/common_load.h"
#include "utils.h"
diff --git a/test/904-object-allocation/tracking.cc b/test/904-object-allocation/tracking.cc
index 95eab0c6cc..cc6f681d79 100644
--- a/test/904-object-allocation/tracking.cc
+++ b/test/904-object-allocation/tracking.cc
@@ -21,7 +21,7 @@
#include "base/logging.h"
#include "jni.h"
-#include "openjdkjvmti/jvmti.h"
+#include "jvmti.h"
#include "ScopedLocalRef.h"
#include "ScopedUtfChars.h"
#include "ti-agent/common_helper.h"
diff --git a/test/905-object-free/tracking_free.cc b/test/905-object-free/tracking_free.cc
index 7b26d79edb..5eed4729af 100644
--- a/test/905-object-free/tracking_free.cc
+++ b/test/905-object-free/tracking_free.cc
@@ -21,7 +21,7 @@
#include "base/logging.h"
#include "jni.h"
-#include "openjdkjvmti/jvmti.h"
+#include "jvmti.h"
#include "ScopedLocalRef.h"
#include "ScopedUtfChars.h"
#include "ti-agent/common_helper.h"
diff --git a/test/906-iterate-heap/iterate_heap.cc b/test/906-iterate-heap/iterate_heap.cc
index 13c3562b60..f2532debfb 100644
--- a/test/906-iterate-heap/iterate_heap.cc
+++ b/test/906-iterate-heap/iterate_heap.cc
@@ -26,7 +26,7 @@
#include "android-base/stringprintf.h"
#include "base/logging.h"
#include "jni.h"
-#include "openjdkjvmti/jvmti.h"
+#include "jvmti.h"
#include "ScopedPrimitiveArray.h"
#include "ti-agent/common_helper.h"
#include "ti-agent/common_load.h"
diff --git a/test/907-get-loaded-classes/get_loaded_classes.cc b/test/907-get-loaded-classes/get_loaded_classes.cc
index 5bda7ebac8..48ce2e2de1 100644
--- a/test/907-get-loaded-classes/get_loaded_classes.cc
+++ b/test/907-get-loaded-classes/get_loaded_classes.cc
@@ -21,7 +21,7 @@
#include "base/macros.h"
#include "jni.h"
-#include "openjdkjvmti/jvmti.h"
+#include "jvmti.h"
#include "ScopedLocalRef.h"
#include "ScopedUtfChars.h"
diff --git a/test/908-gc-start-finish/gc_callbacks.cc b/test/908-gc-start-finish/gc_callbacks.cc
index 8f96ee63ef..45148f87cd 100644
--- a/test/908-gc-start-finish/gc_callbacks.cc
+++ b/test/908-gc-start-finish/gc_callbacks.cc
@@ -19,7 +19,7 @@
#include "base/macros.h"
#include "jni.h"
-#include "openjdkjvmti/jvmti.h"
+#include "jvmti.h"
#include "ti-agent/common_helper.h"
#include "ti-agent/common_load.h"
diff --git a/test/909-attach-agent/attach.cc b/test/909-attach-agent/attach.cc
index adae844ef0..67c756745f 100644
--- a/test/909-attach-agent/attach.cc
+++ b/test/909-attach-agent/attach.cc
@@ -20,7 +20,7 @@
#include <stdio.h>
#include <string.h>
#include "base/macros.h"
-#include "openjdkjvmti/jvmti.h"
+#include "jvmti.h"
namespace art {
namespace Test909AttachAgent {
diff --git a/test/910-methods/methods.cc b/test/910-methods/methods.cc
index f60fabb1df..fdc4cdbe04 100644
--- a/test/910-methods/methods.cc
+++ b/test/910-methods/methods.cc
@@ -18,7 +18,7 @@
#include "base/macros.h"
#include "jni.h"
-#include "openjdkjvmti/jvmti.h"
+#include "jvmti.h"
#include "ScopedLocalRef.h"
#include "ti-agent/common_helper.h"
diff --git a/test/911-get-stack-trace/stack_trace.cc b/test/911-get-stack-trace/stack_trace.cc
index 68f6d8dfb2..5a3a311255 100644
--- a/test/911-get-stack-trace/stack_trace.cc
+++ b/test/911-get-stack-trace/stack_trace.cc
@@ -24,7 +24,7 @@
#include "base/logging.h"
#include "base/macros.h"
#include "jni.h"
-#include "openjdkjvmti/jvmti.h"
+#include "jvmti.h"
#include "ScopedLocalRef.h"
#include "ti-agent/common_helper.h"
#include "ti-agent/common_load.h"
diff --git a/test/912-classes/classes.cc b/test/912-classes/classes.cc
index 3ccfe86bed..5bd34f6be8 100644
--- a/test/912-classes/classes.cc
+++ b/test/912-classes/classes.cc
@@ -20,7 +20,7 @@
#include "class_linker.h"
#include "jni.h"
#include "mirror/class_loader.h"
-#include "openjdkjvmti/jvmti.h"
+#include "jvmti.h"
#include "runtime.h"
#include "ScopedLocalRef.h"
#include "ScopedUtfChars.h"
diff --git a/test/913-heaps/heaps.cc b/test/913-heaps/heaps.cc
index 39fa000195..66fc7bef9a 100644
--- a/test/913-heaps/heaps.cc
+++ b/test/913-heaps/heaps.cc
@@ -28,7 +28,7 @@
#include "jit/jit.h"
#include "jni.h"
#include "native_stack_dump.h"
-#include "openjdkjvmti/jvmti.h"
+#include "jvmti.h"
#include "runtime.h"
#include "scoped_thread_state_change-inl.h"
#include "thread-inl.h"
diff --git a/test/918-fields/fields.cc b/test/918-fields/fields.cc
index 7d29912f47..c659126aae 100644
--- a/test/918-fields/fields.cc
+++ b/test/918-fields/fields.cc
@@ -18,7 +18,7 @@
#include "base/macros.h"
#include "jni.h"
-#include "openjdkjvmti/jvmti.h"
+#include "jvmti.h"
#include "ScopedLocalRef.h"
#include "ti-agent/common_helper.h"
diff --git a/test/920-objects/objects.cc b/test/920-objects/objects.cc
index 0553a9d007..ad1431ed00 100644
--- a/test/920-objects/objects.cc
+++ b/test/920-objects/objects.cc
@@ -18,7 +18,7 @@
#include "base/macros.h"
#include "jni.h"
-#include "openjdkjvmti/jvmti.h"
+#include "jvmti.h"
#include "ScopedLocalRef.h"
#include "ti-agent/common_helper.h"
diff --git a/test/922-properties/properties.cc b/test/922-properties/properties.cc
index cb732c74f1..3fd274e9d6 100644
--- a/test/922-properties/properties.cc
+++ b/test/922-properties/properties.cc
@@ -18,7 +18,7 @@
#include "base/macros.h"
#include "jni.h"
-#include "openjdkjvmti/jvmti.h"
+#include "jvmti.h"
#include "ScopedUtfChars.h"
#include "ti-agent/common_helper.h"
diff --git a/test/923-monitors/monitors.cc b/test/923-monitors/monitors.cc
index 4baa530ec2..131fc6a4d4 100644
--- a/test/923-monitors/monitors.cc
+++ b/test/923-monitors/monitors.cc
@@ -18,7 +18,7 @@
#include "base/macros.h"
#include "jni.h"
-#include "openjdkjvmti/jvmti.h"
+#include "jvmti.h"
#include "ScopedUtfChars.h"
#include "ti-agent/common_helper.h"
diff --git a/test/924-threads/threads.cc b/test/924-threads/threads.cc
index 0380433d19..14ea5af60e 100644
--- a/test/924-threads/threads.cc
+++ b/test/924-threads/threads.cc
@@ -20,7 +20,7 @@
#include "base/macros.h"
#include "base/logging.h"
#include "jni.h"
-#include "openjdkjvmti/jvmti.h"
+#include "jvmti.h"
#include "ScopedLocalRef.h"
#include "ti-agent/common_helper.h"
diff --git a/test/925-threadgroups/threadgroups.cc b/test/925-threadgroups/threadgroups.cc
index 6c6e835dd3..2feaab079b 100644
--- a/test/925-threadgroups/threadgroups.cc
+++ b/test/925-threadgroups/threadgroups.cc
@@ -20,7 +20,7 @@
#include "base/macros.h"
#include "base/logging.h"
#include "jni.h"
-#include "openjdkjvmti/jvmti.h"
+#include "jvmti.h"
#include "ScopedLocalRef.h"
#include "ti-agent/common_helper.h"
diff --git a/test/927-timers/timers.cc b/test/927-timers/timers.cc
index 58d5c271e6..7b1d5c3f52 100644
--- a/test/927-timers/timers.cc
+++ b/test/927-timers/timers.cc
@@ -20,7 +20,7 @@
#include "base/logging.h"
#include "base/macros.h"
#include "jni.h"
-#include "openjdkjvmti/jvmti.h"
+#include "jvmti.h"
#include "ti-agent/common_helper.h"
#include "ti-agent/common_load.h"
diff --git a/test/928-jni-table/jni_table.cc b/test/928-jni-table/jni_table.cc
index 5123d3a43f..b5c0efdd95 100644
--- a/test/928-jni-table/jni_table.cc
+++ b/test/928-jni-table/jni_table.cc
@@ -17,7 +17,7 @@
#include <stdio.h>
#include "jni.h"
-#include "openjdkjvmti/jvmti.h"
+#include "jvmti.h"
#include "base/logging.h"
#include "base/macros.h"
diff --git a/test/929-search/search.cc b/test/929-search/search.cc
index d1c698491e..ad7a05323b 100644
--- a/test/929-search/search.cc
+++ b/test/929-search/search.cc
@@ -20,7 +20,7 @@
#include "base/logging.h"
#include "base/macros.h"
#include "jni.h"
-#include "openjdkjvmti/jvmti.h"
+#include "jvmti.h"
#include "ScopedUtfChars.h"
#include "ti-agent/common_helper.h"
diff --git a/test/931-agent-thread/agent_thread.cc b/test/931-agent-thread/agent_thread.cc
index a488d9a803..f8f9e48657 100644
--- a/test/931-agent-thread/agent_thread.cc
+++ b/test/931-agent-thread/agent_thread.cc
@@ -21,7 +21,7 @@
#include "base/logging.h"
#include "base/macros.h"
#include "jni.h"
-#include "openjdkjvmti/jvmti.h"
+#include "jvmti.h"
#include "runtime.h"
#include "ScopedLocalRef.h"
#include "thread-inl.h"
diff --git a/test/933-misc-events/misc_events.cc b/test/933-misc-events/misc_events.cc
index 860d4b5e16..7043350b5a 100644
--- a/test/933-misc-events/misc_events.cc
+++ b/test/933-misc-events/misc_events.cc
@@ -21,7 +21,7 @@
#include "base/logging.h"
#include "base/macros.h"
#include "jni.h"
-#include "openjdkjvmti/jvmti.h"
+#include "jvmti.h"
#include "ti-agent/common_helper.h"
#include "ti-agent/common_load.h"
diff --git a/test/936-search-onload/search_onload.cc b/test/936-search-onload/search_onload.cc
index 2286a467d3..3b19ca591d 100644
--- a/test/936-search-onload/search_onload.cc
+++ b/test/936-search-onload/search_onload.cc
@@ -22,7 +22,7 @@
#include "base/logging.h"
#include "base/macros.h"
#include "jni.h"
-#include "openjdkjvmti/jvmti.h"
+#include "jvmti.h"
#include "ScopedUtfChars.h"
#include "ti-agent/common_helper.h"
diff --git a/test/944-transform-classloaders/classloader.cc b/test/944-transform-classloaders/classloader.cc
index 5fbd8e11c9..7cb3c08dc3 100644
--- a/test/944-transform-classloaders/classloader.cc
+++ b/test/944-transform-classloaders/classloader.cc
@@ -16,8 +16,8 @@
#include "base/macros.h"
#include "jni.h"
+#include "jvmti.h"
#include "mirror/class-inl.h"
-#include "openjdkjvmti/jvmti.h"
#include "ScopedLocalRef.h"
#include "ti-agent/common_helper.h"
diff --git a/test/945-obsolete-native/obsolete_native.cc b/test/945-obsolete-native/obsolete_native.cc
index 061e7afbbc..442836b7ff 100644
--- a/test/945-obsolete-native/obsolete_native.cc
+++ b/test/945-obsolete-native/obsolete_native.cc
@@ -24,7 +24,7 @@
#include "base/logging.h"
#include "base/macros.h"
#include "jni.h"
-#include "openjdkjvmti/jvmti.h"
+#include "jvmti.h"
#include "ScopedLocalRef.h"
#include "ti-agent/common_helper.h"
#include "ti-agent/common_load.h"
diff --git a/test/Android.bp b/test/Android.bp
index 00c890a834..594cce2a6e 100644
--- a/test/Android.bp
+++ b/test/Android.bp
@@ -279,6 +279,7 @@ art_cc_defaults {
shared_libs: [
"libbase",
],
+ header_libs: ["libopenjdkjvmti_headers"],
}
art_cc_test_library {
diff --git a/test/knownfailures.json b/test/knownfailures.json
index 50d70f18dc..535b94fdf0 100644
--- a/test/knownfailures.json
+++ b/test/knownfailures.json
@@ -103,7 +103,8 @@
{
"test": "152-dead-large-object",
"variant": "gcstress",
- "description": ["152-dead-large-object requires a heap larger than what gcstress uses."]
+ "description": ["152-dead-large-object requires a heap larger than what gcstress uses."],
+ "bug": "http://b/35800768"
},
{
"tests": ["908-gc-start-finish",
@@ -128,9 +129,10 @@
"variant": "gcstress"
},
{
- "tests": "154-gc-loop",
- "variant": "gcstress | jit",
- "description": ["154-gc-loop depends GC not happening too often"]
+ "test": "154-gc-loop",
+ "variant": "gcstress | jit & debug",
+ "description": ["154-gc-loop depends GC not happening too often"],
+ "bug": "http://b/35917229"
},
{
"test": "115-native-bridge",
diff --git a/test/testrunner/run_build_test_target.py b/test/testrunner/run_build_test_target.py
index 0cd1ddee7b..4c519ae7f7 100755
--- a/test/testrunner/run_build_test_target.py
+++ b/test/testrunner/run_build_test_target.py
@@ -14,15 +14,28 @@
# See the License for the specific language governing permissions and
# limitations under the License.
+"""Build and run go/ab/git_master-art-host target
+
+Provided with a target name, the script setup the environment for
+building the test target by taking config information from
+from target_config.py.
+
+If the target field is defined in the configuration for the target, it
+invokes `make` to build the target, otherwise, it assumes
+that the its is a run-test target, and invokes testrunner.py
+script for building and running the run-tests.
+"""
+
import argparse
import os
import subprocess
+import sys
from target_config import target_config
import env
parser = argparse.ArgumentParser()
-parser.add_argument('--build-target', required=True, dest='build_target')
+parser.add_argument('build_target')
parser.add_argument('-j', default='1', dest='n_threads')
options = parser.parse_args()
@@ -49,6 +62,7 @@ else:
run_test_command += target.get('flags', [])
run_test_command += ['-j', str(n_threads)]
run_test_command += ['-b']
+ run_test_command += ['--host']
run_test_command += ['--verbose']
print run_test_command
diff --git a/test/testrunner/target_config.py b/test/testrunner/target_config.py
index 5387d6a8e8..1af2ae7a63 100644
--- a/test/testrunner/target_config.py
+++ b/test/testrunner/target_config.py
@@ -51,7 +51,8 @@ target_config = {
'flags': ['--jit',
'--gcstress'],
'env' : {
- 'ART_USE_READ_BARRIER' : 'false'
+ 'ART_USE_READ_BARRIER' : 'false',
+ 'ART_DEFAULT_GC_TYPE' : 'SS'
}
},
'art-read-barrier' : {
@@ -185,20 +186,20 @@ target_config = {
}
},
'art-gtest' : {
- 'target' : 'test-art-gtest',
+ 'target' : 'test-art-host-gtest',
'env' : {
'ART_USE_READ_BARRIER' : 'true'
}
},
'art-gtest-read-barrier': {
- 'target' : 'test-art-gtest',
+ 'target' : 'test-art-host-gtest',
'env' : {
'ART_USE_READ_BARRIER' : 'true',
'ART_HEAP_POISONING' : 'true'
}
},
'art-gtest-read-barrier-table-lookup': {
- 'target' : 'test-art-gtest',
+ 'target' : 'test-art-host-gtest',
'env': {
'ART_USE_READ_BARRIER' : 'true',
'ART_READ_BARRIER_TYPE' : 'TABLELOOKUP',
@@ -206,21 +207,21 @@ target_config = {
}
},
'art-gtest-ss-gc': {
- 'target' : 'test-art-gtest',
+ 'target' : 'test-art-host-gtest',
'env': {
'ART_DEFAULT_GC_TYPE' : 'SS',
'ART_USE_READ_BARRIER' : 'false'
}
},
'art-gtest-gss-gc': {
- 'target' : 'test-art-gtest',
+ 'target' : 'test-art-host-gtest',
'env' : {
'ART_DEFAULT_GC_TYPE' : 'GSS',
'ART_USE_READ_BARRIER' : 'false'
}
},
'art-gtest-ss-gc-tlab': {
- 'target' : 'test-art-gtest',
+ 'target' : 'test-art-host-gtest',
'env': {
'ART_DEFAULT_GC_TYPE' : 'SS',
'ART_USE_TLAB' : 'true',
@@ -228,13 +229,20 @@ target_config = {
}
},
'art-gtest-gss-gc-tlab': {
- 'target' : 'test-art-gtest',
+ 'target' : 'test-art-host-gtest',
'env': {
'ART_DEFAULT_GC_TYPE' : 'GSS',
'ART_USE_TLAB' : 'true',
'ART_USE_READ_BARRIER' : 'false'
}
},
+ 'art-gtest-debug-gc' : {
+ 'target' : 'test-art-host-gtest',
+ 'env' : {
+ 'ART_TEST_DEBUG_GC' : 'true',
+ 'ART_USE_READ_BARRIER' : 'false'
+ }
+ },
'art-gtest-valgrind32': {
'target' : 'valgrind-test-art-host32',
'env': {
diff --git a/test/testrunner/testrunner.py b/test/testrunner/testrunner.py
index f77e9adb10..b814e14916 100755
--- a/test/testrunner/testrunner.py
+++ b/test/testrunner/testrunner.py
@@ -643,12 +643,25 @@ def print_analysis():
console_width = int(os.popen('stty size', 'r').read().split()[1])
eraser_text = '\r' + ' ' * console_width + '\r'
print_text(eraser_text)
+
+ # Prints information about the total tests run.
+ # E.g., "2/38 (5%) tests passed".
+ passed_test_count = total_test_count - len(skipped_tests) - len(failed_tests)
+ passed_test_information = ('%d/%d (%d%%) %s passed.\n') % (
+ passed_test_count,
+ total_test_count,
+ (passed_test_count*100)/total_test_count,
+ 'tests' if passed_test_count > 1 else 'test')
+ print_text(passed_test_information)
+
+ # Prints the list of skipped tests, if any.
if skipped_tests:
print_text(COLOR_SKIP + 'SKIPPED TESTS' + COLOR_NORMAL + '\n')
for test in skipped_tests:
print_text(test + '\n')
print_text('\n')
+ # Prints the list of failed tests, if any.
if failed_tests:
print_text(COLOR_ERROR + 'FAILED TESTS' + COLOR_NORMAL + '\n')
for test in failed_tests:
diff --git a/test/ti-agent/common_helper.cc b/test/ti-agent/common_helper.cc
index ea6359e5e0..4ddd0aafb0 100644
--- a/test/ti-agent/common_helper.cc
+++ b/test/ti-agent/common_helper.cc
@@ -25,7 +25,7 @@
#include "art_method.h"
#include "jni.h"
#include "jni_internal.h"
-#include "openjdkjvmti/jvmti.h"
+#include "jvmti.h"
#include "scoped_thread_state_change-inl.h"
#include "ScopedLocalRef.h"
#include "stack.h"
diff --git a/test/ti-agent/common_helper.h b/test/ti-agent/common_helper.h
index 031850147e..0a316edc7b 100644
--- a/test/ti-agent/common_helper.h
+++ b/test/ti-agent/common_helper.h
@@ -18,7 +18,7 @@
#define ART_TEST_TI_AGENT_COMMON_HELPER_H_
#include "jni.h"
-#include "openjdkjvmti/jvmti.h"
+#include "jvmti.h"
#include "ScopedLocalRef.h"
namespace art {
diff --git a/test/ti-agent/common_load.cc b/test/ti-agent/common_load.cc
index 351857d1d9..fddae3af02 100644
--- a/test/ti-agent/common_load.cc
+++ b/test/ti-agent/common_load.cc
@@ -18,8 +18,6 @@
#include <jni.h>
#include <stdio.h>
-// TODO I don't know?
-#include "openjdkjvmti/jvmti.h"
#include "art_method-inl.h"
#include "base/logging.h"
diff --git a/test/ti-agent/common_load.h b/test/ti-agent/common_load.h
index d2544214ec..e79a0067b0 100644
--- a/test/ti-agent/common_load.h
+++ b/test/ti-agent/common_load.h
@@ -17,8 +17,7 @@
#ifndef ART_TEST_TI_AGENT_COMMON_LOAD_H_
#define ART_TEST_TI_AGENT_COMMON_LOAD_H_
-#include "jni.h"
-#include "openjdkjvmti/jvmti.h"
+#include "jvmti.h"
namespace art {