summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xtest/656-annotation-lookup-generic-jni/check21
-rw-r--r--test/656-annotation-lookup-generic-jni/info.txt10
-rw-r--r--test/656-annotation-lookup-generic-jni/src-art/Main.java (renamed from test/656-annotation-lookup-generic-jni/src/Main.java)0
3 files changed, 27 insertions, 4 deletions
diff --git a/test/656-annotation-lookup-generic-jni/check b/test/656-annotation-lookup-generic-jni/check
new file mode 100755
index 0000000000..39a52d5297
--- /dev/null
+++ b/test/656-annotation-lookup-generic-jni/check
@@ -0,0 +1,21 @@
+#!/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.
+
+# On gcstress configurations, an extra "JNI_OnUnload called" line may
+# be emitted. If so, remove it.
+sed -e '${/^JNI_OnUnload called$/d;}' "$2" > "$2.tmp"
+
+./default-check "$1" "$2.tmp"
diff --git a/test/656-annotation-lookup-generic-jni/info.txt b/test/656-annotation-lookup-generic-jni/info.txt
index ddc19300ce..9049bfcf80 100644
--- a/test/656-annotation-lookup-generic-jni/info.txt
+++ b/test/656-annotation-lookup-generic-jni/info.txt
@@ -1,5 +1,7 @@
Non-regression test for b/38454151, where the invocation of a native
-method with an annotatation through Generic JNI would crash the
-Generic JNI trampoline because it would throw and exception when
-trying to resolve the annotation (during the CriticalNative/FastNative
-optimization annotation lookup).
+method with an annotation (to be found in a custom class loader)
+through Generic JNI would crash the Generic JNI trampoline because it
+would throw an exception (that should eventually be caught) and walk a
+stack with an unexpected layout when trying to resolve the method's
+annotation classes (during the CriticalNative/FastNative optimization
+annotation lookup).
diff --git a/test/656-annotation-lookup-generic-jni/src/Main.java b/test/656-annotation-lookup-generic-jni/src-art/Main.java
index 01b288a900..01b288a900 100644
--- a/test/656-annotation-lookup-generic-jni/src/Main.java
+++ b/test/656-annotation-lookup-generic-jni/src-art/Main.java