--- old/test/runtime/ErrorHandling/TestOnOutOfMemoryError.java 2017-04-26 12:45:48.209155691 +0300 +++ new/test/runtime/ErrorHandling/TestOnOutOfMemoryError.java 2017-04-26 12:45:48.030150969 +0300 @@ -23,11 +23,11 @@ /* * @test TestOnOutOfMemoryError - * @summary Test using -XX:OnOutOfMemoryError= + * @summary Test using multiple -XX:OnOutOfMemoryError= * @modules java.base/jdk.internal.misc * @library /test/lib * @run main TestOnOutOfMemoryError - * @bug 8078470 + * @bug 8078470 8177522 */ import jdk.test.lib.process.ProcessTools; @@ -44,9 +44,11 @@ } // else this is the main test - String msg = "Test Succeeded"; + String msg1 = "Test1 Succeeded"; + String msg2 = "Test2 Succeeded"; ProcessBuilder pb = ProcessTools.createJavaProcessBuilder( - "-XX:OnOutOfMemoryError=echo " + msg, + "-XX:OnOutOfMemoryError=echo " + msg1, + "-XX:OnOutOfMemoryError=echo " + msg2, TestOnOutOfMemoryError.class.getName(), "throwOOME"); @@ -65,7 +67,8 @@ both get written to stdout. */ output.shouldContain("Requested array size exceeds VM limit"); - output.stdoutShouldMatch("^" + msg); // match start of line only + output.stdoutShouldMatch("^" + msg1); // match start of line only + output.stdoutShouldMatch("^" + msg2); // match start of line only System.out.println("PASSED"); } }