On Tue, 28 May 2024 03:15:43 GMT, Leonid Mesnik <lmes...@openjdk.org> wrote:

> The vmTestbase/nsk/share/LocalProcess.java is a wrapper for debuggee process. 
> It extends FinalizableObject to kill the debuggee process.
> 
> The debuggee process is used by nsk.jdb tests only, see runTest(...) in 
> vmTestbase/nsk/share/jdb/JdbTest.java:
> https://github.com/openjdk/jdk/blob/master/test/hotspot/jtreg/vmTestbase/nsk/share/jdb/JdbTest.java#L189
> 
> I verified that process is always already terminated when is cleaned during 
> VM shutdown hook,
> So the fix is just to remove the finalization.
> 
> I also moved LocalProcess into nsk.share.jdb to reduce the visibility of 
> class and hardened checks in runTest.

test/hotspot/jtreg/vmTestbase/nsk/share/jdb/JdbTest.java line 221:

> 219:                 }
> 220: 
> 221:                 if (debuggee != null && debuggee.terminated()) {

Shouldn't this be `!debuggee.terminated()`?

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

PR Review Comment: https://git.openjdk.org/jdk/pull/19418#discussion_r1617771060

Reply via email to