RFR for JDK-7027502: Test failures in demo/jvmti/hprof testcases, need to be othervm
David Holmes
david.holmes at oracle.com
Thu Jan 9 22:35:36 UTC 2014
On 9/01/2014 10:14 PM, Alan Bateman wrote:
> On 09/01/2014 11:27, David Holmes wrote:
>>
>> Okay I think I get it now. Both MonitorTest and WaitersTest use the
>> Context class, so if both tests run in the same VM the second test
>> will see the static total_turns_taken and "turn" in the state they
>> were left from the first test - hence the second test will always
>> fail. The bug report suggests making the tests othervm to avoid the
>> problem but instead you have changed from using static state to
>> instance state so that there is no interference.
> I haven't been following this one closely but I thought that jtreg
> created a class loader for each test (irrespective of mode) so I
> wouldn't expect statics to be an issue.
That aside DemoRun forks off its own JVM to run a given test anyway!
So I don't understand how the proposed fixes could actually be
addressing the hangs that are occurring. Even if the statics were being
shared I don't see how that leads to the failure mode in the bug report.
David
> -Alan.
More information about the core-libs-dev
mailing list