RFR: 8255072: [TESTBUG] com/sun/jdi/EATests.java should not fail if expected VMOutOfMemoryException is not thrown
Richard Reingruber
rrich at openjdk.java.net
Wed Oct 21 10:24:00 UTC 2020
On Tue, 20 Oct 2020 22:45:45 GMT, Chris Plummer <cjplummer at openjdk.org> wrote:
> If the test does not throw OOME, has it actually tested anything in that
> case?
If an OOME is expected then it has tested object reallocation in frames affected
by PopFrame/ForceEarlyReturn.
But there are runs where OOME is not expected. I added a new commit which skips
the test cases then.
> My concern with any test that allows for what is suppose to be an
> occasional failure it that it will not detect if something breaks and causes
> that failure to happen every time, often rendering the test useless.
I can follow that concern. My problem is that I cannot reproduce the
failure. Note also that the OOME is successfully generated during object
reallocation a couple of times before (search "run args" in attachments
to the JBS issue).
I'd think the approach to prove the OOME during the PopFrame/ForceEarlyReturn
[1] is relatively reliable knowing how smart GCs try to be with avoiding it.
I've tried to make it even more reliable with a second commit in this pr.
Would that be ok? Maybe you would know a better way?
Thanks, Richard.
[1] https://github.com/openjdk/jdk/blob/7e2640432bf4fb5115c2ff694c09937234e6d1c5/test/jdk/com/sun/jdi/EATests.java#L1089
-------------
PR: https://git.openjdk.java.net/jdk/pull/775
More information about the serviceability-dev
mailing list