On Thu, 15 Aug 2024 21:12:20 GMT, Chris Plummer <[email protected]> wrote:
> There are issues with the test attaching to the debuggee too soon, and the
> debug agent isn't ready. yet. This test is based on ProcessAttachTest, which
> does not have this issue. I eventually realized the reason why is because
> ProcessAttachTest has this little snippet of code, which I had removed from
> DataDumpTest:
>
> // Wait for the process to start
> InputStream is = p.getInputStream();
> is.read();
>
> This is waiting for the start of the debug agent's "Listening..." message.
> I've re-added this to DataDumpTest, and it seems to fix the issue. Tested by
> running 20 times with `-Xcomp` on all supported platforms with no failures.
> It used to fail about 2/3 of the time.
Thumbs up. Thanks for including `firstChar` in the debuggee output.
I think this is a trivial fix.
test/jdk/com/sun/jdi/DataDumpTest.java line 100:
> 98: out.waitFor(); // Wait for the debuggee to exit
> 99:
> 100: System.out.println("Deuggee output:");
nit typo: s/Deuggee/Debuggee/
Not your typo, but could you fix it while you are there?
-------------
Marked as reviewed by dcubed (Reviewer).
PR Review: https://git.openjdk.org/jdk/pull/20604#pullrequestreview-2243069811
PR Review Comment: https://git.openjdk.org/jdk/pull/20604#discussion_r1720054663