RFR: 8260878: com/sun/jdi/JdbOptions.java fails without jfr
Chris Plummer
cjplummer at openjdk.java.net
Tue Feb 2 04:12:42 UTC 2021
On Tue, 2 Feb 2021 03:43:29 GMT, Jie Fu <jiefu at openjdk.org> wrote:
> Hi all,
>
> com/sun/jdi/JdbOptions.java fails in our ci/cd when jfr is disabled.
> It would be better to fix it.
>
> Thanks.
> Best regards,
> Jie
test/jdk/com/sun/jdi/JdbOptions.java line 99:
> 97: test("-connect",
> 98: "com.sun.jdi.CommandLineLaunch:vmexec=java,options=\"-client\" \"-XX:+PrintVMOptions\""
> 99: + " -XX:+IgnoreUnrecognizedVMOptions"
You need to be careful when using `-xx:+IgnoreUnrecognizedVMOptions`, because it can result in not detecting typos in the option names, which could happen with this test in the future if any other mods are made. Other options here are to skip this part of the test if JFR is not present, or better yet don't make the test rely on JFR. I don't think there is a reason that it needs to. It seems other options could have been used for the testing. Perhaps @alexmenkov can comment on why it was done this way.
-------------
PR: https://git.openjdk.java.net/jdk/pull/2346
More information about the serviceability-dev
mailing list