Fixes for run-test 656-annotation-lookup-generic-jni.

- Fix test description.
- Move Main.class from `src` to `src-art, as this file uses libcore
  classes.
- Ignore "JNI_OnUnload called" as last output line, which is
  emitted on gcstress configurations.

Test: art/test/testrunner/testrunner.py -t 656-annotation-lookup-generic-jni (with and without `ANDROID_COMPILE_WITH_JACK=false`)
Bug: 38454151
Bug: 34659969
Change-Id: Ifdb59935621b1326d1504cb86e1c9cd343dd054e
diff --git a/test/656-annotation-lookup-generic-jni/check b/test/656-annotation-lookup-generic-jni/check
new file mode 100755
index 0000000..39a52d5
--- /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 ddc1930..9049bfc 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
similarity index 100%
rename from test/656-annotation-lookup-generic-jni/src/Main.java
rename to test/656-annotation-lookup-generic-jni/src-art/Main.java