On Wed, 13 May 2026 15:37:45 GMT, Chris Plummer <[email protected]> wrote:

>> The test sees the following output and is supposed to detect the "main[1]" 
>> prompt to indicate it is done with the "locals" command that was issued, and 
>> then issue a "cont" command:
>> 
>> [9:13:15.40] Sending command: locals
>> [9:13:15.560] reply[0]: Method arguments:
>> [9:13:15.561] reply[1]: args = instance of java.lang.String[3] (id=669)
>> [9:13:15.561] reply[2]: Local variables:
>> [9:13:15.561] reply[3]: main[1]
>> [9:13:15.561] Sending command: cont 
>> 
>> However, the output instead looks like this:
>> 
>> [21:15:18.114] Sending command: locals
>> [21:15:18.515] reply[0]: Method arguments:
>> [21:15:18.515] reply[1]: args = instance of java.lang.String[3] (id=686)
>> [21:15:18.515] reply[2]: Local variables:
>> [21:15:18.515] Sending command: cont
>> [21:15:18.716] reply[0]: main[1] > 
>> 
>> The JdbTest.findPrompt() code looks for a pattern of characters, followed by 
>> '[', then a number, then ']'. Unfortunately it matches the String[3] text 
>> you see in the output. Because of that the test thought the "locals" command 
>> had completed, and issued the "cont" command too soon, which gets the test 
>> out of sync.
>> 
>> Apparently some tests have had this same issue before and a solution was 
>> already available. You just need to set compoundPromptIdent to the prompt 
>> that the test expects (sans the square brackets part).
>> 
>> I also fixed a couple of comment typos I noticed in JdbTest while debugging 
>> this.
>> 
>> Tested by running kill003 a couple hundred times on the failing platform and 
>> with the failing JVM args.
>> 
>> ---------
>> - [x] I confirm that I make this contribution in accordance with the 
>> [OpenJDK Interim AI Policy](https://openjdk.org/legal/ai).
>
> Chris Plummer has updated the pull request incrementally with one additional 
> commit since the last revision:
> 
>   fix comment

This looks really good. Thank you for figuring out what was wrong and fixing 
this test.

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

Marked as reviewed by coleenp (Reviewer).

PR Review: https://git.openjdk.org/jdk/pull/31048#pullrequestreview-4284301703

Reply via email to