mirror of
https://github.com/openjdk/jdk.git
synced 2026-05-11 14:11:36 +00:00
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:
parent
6ee07f50c8
commit
469ae3ecc7
@ -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();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user