changeset 14449:0dae92546feb

8157146: Add debug printlns to tests FieldSetAccessibleTest and VerifyJimage.java Reviewed-by: alanb, shade
author sundar
date Tue, 17 May 2016 19:53:43 +0530
parents df25fad96353
children 0c3d4e928055
files test/java/lang/Class/getDeclaredField/FieldSetAccessibleTest.java test/tools/jimage/VerifyJimage.java
diffstat 2 files changed, 11 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/test/java/lang/Class/getDeclaredField/FieldSetAccessibleTest.java	Tue May 17 12:06:41 2016 +0200
+++ b/test/java/lang/Class/getDeclaredField/FieldSetAccessibleTest.java	Tue May 17 19:53:43 2016 +0530
@@ -228,12 +228,18 @@
     }
 
     static boolean test(String s, boolean addExports) {
+        String clsName = s.replace('/', '.').substring(0, s.length() - 6);
         try {
+            System.out.println("Loading " + clsName);
             final Class<?> c = Class.forName(
-                    s.replace('/', '.').substring(0, s.length() - 6),
+                    clsName,
                     false,
                     systemClassLoader);
             return test(c, addExports);
+        } catch (VerifyError ve) {
+            System.err.println("VerifyError for " + clsName);
+            ve.printStackTrace(System.err);
+            failed.add(s);
         } catch (Exception t) {
             t.printStackTrace(System.err);
             failed.add(s);
--- a/test/tools/jimage/VerifyJimage.java	Tue May 17 12:06:41 2016 +0200
+++ b/test/tools/jimage/VerifyJimage.java	Tue May 17 19:53:43 2016 +0530
@@ -188,7 +188,11 @@
                         String cn = removeModule(n).replaceAll("\\.class$", "").replace('/', '.');
                         count.incrementAndGet();
                         try {
+                            System.out.println("Loading " + cn);
                             Class.forName(cn, false, loader);
+                        } catch (VerifyError ve) {
+                            System.err.println("VerifyError for " + cn);
+                            failed.add(reader.imageName() + ": " + cn + " not verified: " + ve.getMessage());
                         } catch (ClassNotFoundException e) {
                             failed.add(reader.imageName() + ": " + cn + " not found");
                         }