On Wed, 6 May 2026 02:56:31 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). This pull request has now been integrated. Changeset: b9778ccb Author: Chris Plummer <[email protected]> URL: https://git.openjdk.org/jdk/commit/b9778ccb475891efd6347f7645b9a53c011f70fd Stats: 24 lines in 3 files changed: 13 ins; 1 del; 10 mod 8383631: Test vmTestbase/nsk/jdb/kill/kill003/kill003.java failed - possible NullPointerException Reviewed-by: lmesnik, sspitsyn, coleenp, syan, kevinw ------------- PR: https://git.openjdk.org/jdk/pull/31048
