On Wed, 10 Jun 2026 14:56:29 GMT, Viktor Klang <[email protected]> wrote:
>> Viktor Klang has updated the pull request incrementally with two additional
>> commits since the last revision:
>>
>> - Adding regression test for StampedLock
>> - Addressing the same live-lock issue found in AQS in AQLS and StampedLock
>
> test/jdk/java/util/concurrent/tck/StampedLockTest.java line 1534:
>
>> 1532: * test scenario for JDK-8386085
>> 1533: */
>> 1534: public void testShortTimeoutAcquisition() throws
>> InterruptedException {
>
> @DougLea @AlanBateman
>
> I've added the same fix for AQLS and StampedLock to this PR.
>
> While adding a regtest in/for Semaphore is not ideal (I'd rather put it
> closer to the implementations) I think it may be challenging to device 3
> distinct regression tests (one for StampedLock, one for AQLS, and one for
> AQS) for a "single" bug.
>
> So the question is whether we think it is going to be acceptable/preferable
> to have this one test which will stochastically trigger, or if we want to
> somehow device reproducers.
>
> Let me know what you think makes sense and we'll take it from there.
I think one test suffices, adding documentation that if it ever fails, to
further investigate the other classes.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/31436#discussion_r3389692507