RFR: 8283643: [AIX, testbug] MachCodeFramesInErrorFile test fails to find 'Native frames' text [v5]

David Holmes dholmes at openjdk.java.net
Thu Apr 21 03:03:26 UTC 2022


On Wed, 20 Apr 2022 19:09:15 GMT, Doug Simon <dnsimon at openjdk.org> wrote:

>> Tyler Steele has updated the pull request incrementally with two additional commits since the last revision:
>> 
>>  - Revert "Test: Sample error with no printing should print hs_err output"
>>    
>>    This reverts commit 6c70a45d862c1aa26d9c4d585bf8ecd39892e3bb.
>>  - Adds logging to stdout/stderr to prevent too-long Exception messages.
>
> test/hotspot/jtreg/runtime/ErrorHandling/MachCodeFramesInErrorFile.java line 133:
> 
>> 131:             System.out.println("stdout:\n" + output.getStdout());
>> 132:             System.err.println("stderr:\n" + output.getStderr());
>> 133:             throw new RuntimeException("Did not find hs_err_pid file in output");
> 
> Why this change (and a similar one at the end of the file)? This separates the reporting of a failed condition (i.e., could not find expected patten in output) from the context (i.e. contents of stderr and stdout) that assists in diagnosing why the condition may have failed.

Also the test should really take advantage of output.shouldMatch to check for the hs_err line, which in turn will report stdout and stderr on failure, and throw the exception.

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

PR: https://git.openjdk.java.net/jdk/pull/8094


More information about the hotspot-runtime-dev mailing list