RFR: 8264663: Update test SuspendWithCurrentThread.java to verify that suspend doesn't exit until resumed

Serguei Spitsyn sspitsyn at openjdk.java.net
Fri Apr 23 22:08:21 UTC 2021


On Fri, 23 Apr 2021 21:07:56 GMT, Leonid Mesnik <lmesnik at openjdk.org> wrote:

> Test test/hotspot/jtreg/serviceability/jvmti/SuspendWithCurrentThread/SuspendWithCurrentThread.java
> doesn't check that thread stops in SuspendThreadList(...).
> 
> Actually, before https://bugs.openjdk.java.net/browse/JDK-8257831 the thread didn't suspend itself but only get a request to be suspended.  So it continued to execute and stopped a little bit later.
> 
> Such behavior is a violation of spec which says " If the calling thread is specified in the request_list array, this function will not return until some other thread resumes it."
> 
> While the bug is fixed it is still useful to verify correct behavior.  If the fix is backported without JDK-8257831 test should start failing.

Hi Leonid,

It looks good to me.
I just wonder if it works on all platforms including Windows.

Thanks,
serguei

-------------

Marked as reviewed by sspitsyn (Reviewer).

PR: https://git.openjdk.java.net/jdk/pull/3665


More information about the serviceability-dev mailing list