8146137: runtime/logging/ExceptionsTest.java fails on embedded and ARM test
authorrprotacio
Wed, 27 Jan 2016 11:12:25 -0500
changeset 35859 03ccd6738bc4
parent 35858 6e704583a38f
child 35860 c679e1ab7e9c
8146137: runtime/logging/ExceptionsTest.java fails on embedded and ARM test Summary: Removed part of ExceptionsTest.java looking for exception that is not printed when function is compiled on embedded/ARM Reviewed-by: coleenp, dholmes
hotspot/test/runtime/logging/ExceptionsTest.java
--- a/hotspot/test/runtime/logging/ExceptionsTest.java	Thu Jan 21 12:11:20 2016 -0500
+++ b/hotspot/test/runtime/logging/ExceptionsTest.java	Wed Jan 27 11:12:25 2016 -0500
@@ -24,7 +24,7 @@
 /*
  * @test
  * @bug 8141211
- * @summary exceptions=info output should have an exception message for both interpreter and compiled methods
+ * @summary exceptions=info output should have an exception message for interpreter methods
  * @library /testlibrary
  * @modules java.base/sun.misc
  *          java.management
@@ -40,8 +40,6 @@
         OutputAnalyzer output = new OutputAnalyzer(pb.start());
         output.shouldContain("<a 'java/lang/RuntimeException': Test exception 1 for logging>");
         output.shouldContain(" thrown in interpreter method ");
-        output.shouldContain(" thrown in compiled method ");
-        output.shouldContain("Exception 2 caught.");
         output.shouldHaveExitValue(0);
     }
 
@@ -53,46 +51,29 @@
 
     public static void main(String[] args) throws Exception {
         ProcessBuilder pb = ProcessTools.createJavaProcessBuilder("-Xlog:exceptions=info",
-                                                                  "-Xcomp",
-                                                                  "-XX:CompileCommand=compileonly,ExceptionsTest$InternalClass::compileMe",
                                                                   InternalClass.class.getName());
         analyzeOutputOn(pb);
 
         pb = ProcessTools.createJavaProcessBuilder("-XX:+TraceExceptions",
-                                                   "-Xcomp",
-                                                   "-XX:CompileCommand=compileonly,ExceptionsTest$InternalClass::compileMe",
                                                    InternalClass.class.getName());
         analyzeOutputOn(pb);
 
         pb = ProcessTools.createJavaProcessBuilder("-Xlog:exceptions=off",
-                                                   "-Xcomp",
-                                                   "-XX:CompileCommand=compileonly,ExceptionsTest$InternalClass::compileMe",
                                                    InternalClass.class.getName());
         analyzeOutputOff(pb);
 
         pb = ProcessTools.createJavaProcessBuilder("-XX:-TraceExceptions",
-                                                   "-Xcomp",
-                                                   "-XX:CompileCommand=compileonly,ExceptionsTest$InternalClass::compileMe",
                                                    InternalClass.class.getName());
         analyzeOutputOff(pb);
     }
 
     public static class InternalClass {
-        public static void compileMe() throws Exception {
-            try {
-                throw new RuntimeException("Test exception 2 for logging");
-            } catch (Exception e) {
-                System.out.println("Exception 2 caught.");
-            }
-        }
-
         public static void main(String[] args) throws Exception {
             try {
                 throw new RuntimeException("Test exception 1 for logging");
             } catch (Exception e) {
                 System.out.println("Exception 1 caught.");
             }
-            compileMe();
         }
     }
 }