[prev in list] [next in list] [prev in thread] [next in thread] 

List:       openjdk-serviceability-dev
Subject:    Re: RFR: 8269770: nsk tests should start IOPipe channel before launch debuggee - Debugee.prepareDebu
From:       Kevin Walls <kevinw () openjdk ! java ! net>
Date:       2021-08-27 17:26:27
Message-ID: C1aZZOWJ1cFqyfCxaWSrDR4e9wHPuHf7BK0Uo6MmCLo=.ea14326a-a88e-4c59-88f9-6209ef01b0ff () github ! com
[Download RAW message or body]

On Fri, 2 Jul 2021 19:30:11 GMT, Alex Menkov <amenkov@openjdk.org> wrote:

> > The change fixes several hundreds tests which launch debugee by using uses \
> > Debugee.prepareDebugee() method or use  debugee = Binder.bindToDebugee(...);
> > IOPipe pipe = debugee.createIOPipe();
> > logic.
> > Debugee.prepareDebugee() and Binder.bindToDebugee() launch debuggee by using \
> > CommandLineLaunch JDI connector with suspend=="true" argument, so they return \
> > debuggee suspended before the main class is loaded. The fix starts IOPipe \
> > listening before debuggee VM is resumed. 
> > Simplified isPackagePrivate/accipp001.java test to use Debugee.prepareDebugee() - \
> > it does exactly the same as Debugee.prepareDebugee() does (the only difference is \
> > using deprecated IOPipe ctor instead of Debugee.createIOPipe()) 
> > Tested all affected tests:
> > test/hotspot/jtreg/vmTestbase/nsk/jdi
> > test/hotspot/jtreg/vmTestbase/nsk/jdwp
> > test/hotspot/jtreg/serviceability/dcmd
> 
> Alex Menkov has updated the pull request incrementally with one additional commit \
> since the last revision: 
> Fixed comment

Marked as reviewed by kevinw (Committer).

OK...  New to me but I think I follow enough to sanity check this.

I found that e.g. vmTestbase/nsk/share/jdi/Debugee.java defines prepareDebuggee() \
which calls debugee.createIOPipe(), which is changed here. Previously, \
DebugeeProcess.java uses an IOPipe constructor which is marked deprecated. Now calls \
IOPipe.startDebuggerPipe(Binder binder), which calls startListening(). In \
accipp001.java the prepareDebugee() call in runThis() handles everything it used to \
do itself.

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

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


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic