From maurizio.cimadamore at oracle.com Wed May 5 09:40:12 2021 From: maurizio.cimadamore at oracle.com (Maurizio Cimadamore) Date: Wed, 5 May 2021 10:40:12 +0100 Subject: jtreg-plugin bug In-Reply-To: <43f77677-dff0-de03-b8e0-c0d184a07c44@oracle.com> References: <43f77677-dff0-de03-b8e0-c0d184a07c44@oracle.com> Message-ID: <070e2809-910c-dd14-6c2c-66f8ec00001d@oracle.com> This is a "known" limitation. I note that this is not mentioned in the README, but should. Basically we can only debug the _first_ test action (e.g. @compile or @run). If a test contains multiple actions, the debugger session attaches to the first, and then we get a failure (like you did). For now, the only workaround is to manually "comment" out the tags that are not required, so that only one test action remains. I do not have enough knowledge of IntelliJ internals (e.g. debugging API) to understand how to redirect the debugger from one process to another; if others do, we'd be more than happy to fix this long standing issue. Maurizio On 05/05/2021 01:22, Bradford Wetmore wrote: > Following the instructions on README.md in the source and submitting > the report here. > > I have two very similar tests: one is debuggable, the other returns with: > > ----------System.err:(3/275)---------- > ERROR: transport error 202: connect failed: Connection refused > ERROR: JDWP Transport dt_socket failed to initialize, TRANSPORT_INIT(510) > JDWP exit error AGENT_ERROR_TRANSPORT_INIT(197): No transports > initialized [open/src/jdk.jdwp.agent/share/native/libjdwp/debugInit.c:734] > > It can "run" the test just fine, just not "debug" it. > > After a lot of trial/error, I found the plugin doesn't like @compile, > but is ok with @build. > > diff --git a/test/jdk/javax/net/ssl/ALPN/SSLEngineAlpnTest.java > b/test/jdk/javax/net/ssl/ALPN/SSLEngineAlpnTest.java > index adeb1a7dfc4..cc221d5b582 100644 > --- a/test/jdk/javax/net/ssl/ALPN/SSLEngineAlpnTest.java > +++ b/test/jdk/javax/net/ssl/ALPN/SSLEngineAlpnTest.java > @@ -28,7 +28,7 @@ > ? * @test > ? * @bug 8051498 8145849 8170282 > ? * @summary JEP 244: TLS Application-Layer Protocol Negotiation Extension > - * @compile MyX509ExtendedKeyManager.java > + * @build MyX509ExtendedKeyManager > ? * > ? * @run main/othervm SSLEngineAlpnTest h2????????? UNUSED h2????????? h2 > ? * @run main/othervm SSLEngineAlpnTest h2????????? UNUSED h2,http/1.1 h2 > ...deleted... > > Let me know if you have any questions. > > Brad