[jdk17] RFR: 8271158: runtime/handshake/HandshakeTimeoutTest.java test doesn't check exit code

Daniel D.Daugherty dcubed at openjdk.java.net
Thu Jul 22 19:36:04 UTC 2021


On Thu, 22 Jul 2021 19:12:27 GMT, Igor Ignatyev <iignatyev at openjdk.org> wrote:

> Hi all,
> 
> could you please review this one-liner that adds an exit code check to `runtime/handshake/HandshakeTimeoutTest.java` test?
> 
> Thanks,
> -- Igor

Changes requested by dcubed (Reviewer).

test/hotspot/jtreg/runtime/handshake/HandshakeTimeoutTest.java line 63:

> 61:         output.reportDiagnosticSummary();
> 62:         // In rare cases the target wakes up and performs the handshake at the same time as we timeout.
> 63:         // Therefore it's not certain the timeout will find any thread.

The comment on L62-63 indicates that this line:

    L64: output.shouldMatch("has not cleared handshake op|No thread with an unfinished handshake op");

will sometimes finish with "No thread with an unfinished handshake op". In that case,
won't the test finish with an exit code of zero?

If I'm right about that, you've introduced a rare case where the test will
fail (because the exit code is 0) when it would have passed before.

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

PR: https://git.openjdk.java.net/jdk17/pull/270


More information about the hotspot-runtime-dev mailing list