8146137: runtime/logging/ExceptionsTest.java fails on embedded and ARM test

Removed part of ExceptionsTest.java looking for exception that is not printed when function is compiled on embedded/ARM

Reviewed-by: coleenp, dholmes
This commit is contained in:
Rachel Protacio 2016-01-27 11:12:25 -05:00
parent 6ee07f50c8
commit 469ae3ecc7

View File

@ -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 @@ public class ExceptionsTest {
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 class ExceptionsTest {
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();
}
}
}