RFR: 8335167: Test runtime/Thread/TestAlwaysPreTouchStacks.java failed with Expected a higher ratio between stack committed and reserved [v2]

David Holmes dholmes at openjdk.org
Mon Sep 9 12:12:05 UTC 2024


On Mon, 9 Sep 2024 09:08:09 GMT, Afshin Zafari <azafari at openjdk.org> wrote:

>> test/hotspot/jtreg/runtime/Thread/TestAlwaysPreTouchStacks.java line 99:
>> 
>>> 97:       ProcessBuilder pb = ProcessTools.createLimitedTestJavaProcessBuilder(vmArgs);
>>> 98:       OutputAnalyzer output = new OutputAnalyzer(pb.start());
>>> 99:       output.reportDiagnosticSummary();
>> 
>> Pre-existing, but this should go at the end, otherwise if a test fails you will get two summaries printed.
>
> `reportDiagnosticSummary` should be called to get the outputs to stdout and then look for some specific patterns inside the stdout of the `OutputAnalyzer` object. The call is not for showing the error case of the tests. The calls to `shouldContain` , `shouldNotContain` and more, check the expected pattern to be present in the output.

If any of the checks fail they will automatically call `reportDiagnosticSuummary` so you only need to call it directly if you want the output in the log when the test passes. Hence it should go at the end.

-------------

PR Review Comment: https://git.openjdk.org/jdk/pull/20531#discussion_r1750140298


More information about the hotspot-runtime-dev mailing list