On Tue, 20 Sep 2022 00:36:38 GMT, Leonid Mesnik <lmes...@openjdk.org> wrote:
>> The Thread.suspend/resume is replaced by JVM TI SuspendThread/ResumeThread >> whether it is possible. >> Testcase from test >> test/hotspot/jtreg/vmTestbase/nsk/jdi/ThreadReference/interrupt/interrupt001.java >> was removed because only one environment can suspend threads so debugger is >> not compatible with JVM TI agent suspending test. >> >> Test test/hotspot/jtreg/runtime/handshake/HandshakeSuspendExitTest.java >> starts failing because it got JVMTI_ERROR_INTERNAL. The problem is that >> JvmtiSuspendControl::resume() returned false. However, it might happen only >> if the thread is not suspended, which means that it should be >> JVMTI_ERROR_THREAD_NOT_SUSPENDED. > > Leonid Mesnik has updated the pull request incrementally with one additional > commit since the last revision: > > revert changes test/hotspot/jtreg/testlibrary/jvmti/libJvmtiUtils.cpp line 84: > 82: } > 83: check_jvmti_status(jni, err, "Error during ResumeThread"); > 84: } Would it better to return the jvmtiError status as an int, so it can be checked at the java level? In fact, it is not good that the `JVMTI_ERROR_THREAD_NOT_ALIVE`, `JVMTI_ERROR_THREAD_SUSPENDED` and `JVMTI_ERROR_THREAD_NOT_SUSPENDED` are always ignored. test/hotspot/jtreg/vmTestbase/nsk/jdi/ThreadReference/interrupt/interrupt001.java line 136: > 134: static final String EQUALS_NOT_INTERRUPTED = "Statuses of threads > are equal: not interrupted"; > 135: > 136: static final int MAX_CASE = 1; This constant is not used anymore. Should it be deleted? ------------- PR: https://git.openjdk.org/jdk/pull/10351