RFR: 8153583: Make OutputAnalyzer.reportDiagnosticSummary public

Bengt Rutisson bengt.rutisson at oracle.com
Wed Apr 6 09:33:51 UTC 2016


Hi StefanK,

On 2016-04-06 11:30, Stefan Karlsson wrote:
> Hi all,
>
> Please review this patch to make one of the testlibrary functions 
> publicly accessible for tests.
>
> http://cr.openjdk.java.net/~stefank/8153583/webrev.01
> https://bugs.openjdk.java.net/browse/JDK-8153583

Looks good.

Bengt

>
> The reason why I need it to be public is that I want to write more 
> complex verification of the the output streams, and still be able to 
> call reportDiagnosticSummary when it fails. For example:
>
>   long size = parseMemoryString(pageSizeStr);
>   if (size != expectedSize) {
>     output.reportDiagnosticSummary();
>     throw new RuntimeException("Match from '" + pattern + "' got " + 
> size + " expected: " + expectedSize);
>   }
>
> Thanks,
> StefanK



More information about the hotspot-dev mailing list