RFR(S): JDK-8145317 ReservedStackTest fails with ReentrantLock looks corrupted

Christian Tornqvist christian.tornqvist at oracle.com
Thu Dec 17 16:56:11 UTC 2015


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