RFR(S): JDK-8145317 ReservedStackTest fails with ReentrantLock looks corrupted
Christian Tornqvist
christian.tornqvist at oracle.com
Thu Dec 17 19:06:20 UTC 2015
There's no "strange coding" involved in changing from System.exit() to throwing an exception like all other Runtime jtreg tests do.
-----Original Message-----
From: Daniel D. Daugherty [mailto:daniel.daugherty at oracle.com]
Sent: Thursday, December 17, 2015 12:02 PM
To: Christian Tornqvist <christian.tornqvist at oracle.com>; 'Frederic Parain' <frederic.parain at oracle.com>; hotspot-runtime-dev at openjdk.java.net
Subject: Re: RFR(S): JDK-8145317 ReservedStackTest fails with ReentrantLock looks corrupted
Finally got the result of the hotspot/test rgrep:
$ rgrep System.exit hotspot/test | wc -l
4279
I'm not going to bother trying to see how many there are in all of jdk/test.
I do not believe that these words apply to main/other tests:
> 2.6. Should a test call the System.exit method?
>
> No. Depending on how you run the tests, you may get a security > exception from the harness.
> Make sure the System.exit() is gone from this test as part of this fix.
I'm going to disagree with that request. Fred would have to do some pretty strange coding to transfer the failure state information from the child thread to the main thread in order to get the failure mode reflected in the return status from the main thread.
Dan
On 12/17/15 9:56 AM, Christian Tornqvist wrote:
> That still doesn't make it correct. Make sure the System.exit() is gone from this test as part of this fix.
>
> -----Original Message-----
> From: Daniel D. Daugherty [mailto:daniel.daugherty at oracle.com]
> Sent: Thursday, December 17, 2015 11:55 AM
> To: Christian Tornqvist <christian.tornqvist at oracle.com>; 'Frederic
> Parain' <frederic.parain at oracle.com>;
> hotspot-runtime-dev at openjdk.java.net
> Subject: Re: RFR(S): JDK-8145317 ReservedStackTest fails with
> ReentrantLock looks corrupted
>
> I'm sorry, but that doesn't match reality:
>
> $ rgrep System.exit hotspot/test/runtime
> hotspot/test/runtime/jsig/TestJNI.java: System.exit(1);
> hotspot/test/runtime/7107135/Test.java: System.exit(run());
> hotspot/test/runtime/RedefineTests/RedefineAnnotations.java:
> System.exit(1);
> hotspot/test/runtime/8026394/InterfaceObjectTest.java: System.exit(1);
> hotspot/test/runtime/ReservedStack/ReservedStackTest.java:
> System.exit(-1);
> hotspot/test/runtime/Thread/TestThreadDumpMonitorContention.java:
> System.exit(1);
>
> $ rgrep System.exit jdk/test/com/sun/jdi
> jdk/test/com/sun/jdi/Exit0.java: System.exit(0);
> jdk/test/com/sun/jdi/RunToExit.java: * @summary Test that with server=y, when VM runs to System.exit() no error happens
> jdk/test/com/sun/jdi/sde/InstallSDE.java: System.exit(1);
>
> Searching the entirety of hotspot/test and jdk/test yields so many calls to System.exit() that I'll leave that as an exercise for the reader...
>
> Dan
>
>
>
> On 12/17/15 9:46 AM, Christian Tornqvist wrote:
>> No, a test should never call System.exit().
>>
>> http://openjdk.java.net/jtreg/faq.html#question2.6
>>
>> Thanks,
>> Christian
>>
>> -----Original Message-----
>> From: Daniel D. Daugherty [mailto:daniel.daugherty at oracle.com]
>> Sent: Thursday, December 17, 2015 11:42 AM
>> To: Christian Tornqvist <christian.tornqvist at oracle.com>; 'Frederic
>> Parain' <frederic.parain at oracle.com>;
>> hotspot-runtime-dev at openjdk.java.net
>> Subject: Re: RFR(S): JDK-8145317 ReservedStackTest fails with
>> ReentrantLock looks corrupted
>>
>> Ummm.... This is a "main/othervm" test and I believe those are allowed to call System.exit(). The error mode is detected in a non-main thread and that's the thread that exits...
>>
>> Dan
>>
>>
>> On 12/17/15 7:10 AM, Christian Tornqvist wrote:
>>> Hi Frederic,
>>>
>>> You're not allowed to do System.exit() in a jtreg test, please change the test to simply return.
>>>
>>> Thanks,
>>> Christian
>>>
>>> -----Original Message-----
>>> From: hotspot-runtime-dev
>>> [mailto:hotspot-runtime-dev-bounces at openjdk.java.net] On Behalf Of
>>> Frederic Parain
>>> Sent: Wednesday, December 16, 2015 7:12 AM
>>> To: hotspot-runtime-dev at openjdk.java.net
>>> Subject: RFR(S): JDK-8145317 ReservedStackTest fails with
>>> ReentrantLock looks corrupted
>>>
>>> Please review this small fix in ReservedStackTest test.
>>> The test didn't exclude correctly some platforms where the feature is not supported. The logic has been changed to explicitly list the supported platforms.
>>>
>>> CR: https://bugs.openjdk.java.net/browse/JDK-8145317
>>>
>>> Webrev: http://cr.openjdk.java.net/~fparain/8145317/webrev/
>>>
>>> Tested with JPRT, testset hotspot with aarch64 platform manually added to the target platforms list.
>>>
>>> Thanks,
>>>
>>> Fred
>>>
>>> --
>>> Frederic Parain - Oracle
>>> Grenoble Engineering Center - France
>>> Phone: +33 4 76 18 81 17
>>> Email: Frederic.Parain at oracle.com
>>>
>
More information about the hotspot-runtime-dev
mailing list