RFR: 8259799: vmTestbase/nsk/jvmti/Breakpoint/breakpoint001 is incorrect

Igor Ignatyev iignatyev at openjdk.java.net
Thu Jan 14 19:26:05 UTC 2021


On Thu, 14 Jan 2021 19:09:59 GMT, Leonid Mesnik <lmesnik at openjdk.org> wrote:

> est vmTestbase/nsk/jvmti/Breakpoint/breakpoint001 has incorrect check of strcmp results here:
> 
>   for (i=0; i<METH_NUM; i++)
>         if (strcmp(methNam,METHODS[i][0]) &&
>                 strcmp(methSig,METHODS[i][1])) {
>             printf("CHECK PASSED: method name: "%s"\tsignature: "%s" %d\n",
>                    methNam, methSig, i);
>             if (checkStatus == PASSED)
>                 bpEvents[i]++;
>             break;
>         }
> 
> So test passed when both strcmp (name,sig) are not zero.
> 
> The test passes only because there are 2 methods that are checked and it increases counters for "incorrect" methods.

@lmesnik , looks good to me, besides a few nits.

test/hotspot/jtreg/vmTestbase/nsk/jvmti/Breakpoint/breakpoint001/breakpoint001.cpp line 2:

> 1: /*
> 2:  * Copyright (c) 2003, 2020, Oracle and/or its affiliates. All rights reserved.

it's 2021

test/hotspot/jtreg/vmTestbase/nsk/jvmti/Breakpoint/breakpoint001/breakpoint001.cpp line 173:

> 171: 
> 172:     for (i=0; i<METH_NUM; i++)
> 173:         if (strcmp(methNam,METHODS[i][0]) == 0 &&

could you please add space before `,`?

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

Marked as reviewed by iignatyev (Reviewer).

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


More information about the serviceability-dev mailing list