On Fri, 31 Jul 2026 11:22:56 GMT, Serguei Spitsyn <[email protected]> wrote:
>> Coleen Phillimore has updated the pull request incrementally with one
>> additional commit since the last revision:
>>
>> Remove something I missed.
>
> test/hotspot/jtreg/serviceability/dcmd/thread/PrintRawMonitorLockTest.java
> line 49:
>
>> 47: import java.util.concurrent.CyclicBarrier;
>> 48: import java.util.concurrent.locks.ReentrantLock;
>> 49: import java.util.regex.Pattern;
>
> Nit: Two imports above at lines 48-49 might be not needed.
Thanks for noticing this.
> test/hotspot/jtreg/serviceability/dcmd/thread/PrintRawMonitorLockTest.java
> line 132:
>
>> 130: break;
>> 131: }
>> 132: }
>
> Nit: The loop above can iterate forever if the `break` at line 130 does not
> happen.
I rewrote this to loop 100 times instead then reporting failure if it doesn't
pass within 100 times. I hope this test won't be cursed on slower systems or
windows.
> test/hotspot/jtreg/serviceability/dcmd/thread/libPrintRawMonitorLockTest.cpp
> line 41:
>
>> 39: printf("\n"); \
>> 40: fflush(stdout); \
>> 41: } while (0)
>
> Nit: It is better to use the `LOG` macro from
> `test/lib/jdk/test/lib/jvmti/jvmti_common.hpp`.
> Then the line 24 can be not needed anymore: `#include <string.h>`
Thanks, it's copied from another test, but this is better.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/32092#discussion_r3690655112
PR Review Comment: https://git.openjdk.org/jdk/pull/32092#discussion_r3690661578
PR Review Comment: https://git.openjdk.org/jdk/pull/32092#discussion_r3690654006