On Mon, 15 Feb 2021 13:21:39 GMT, Severin Gehwolf <[email protected]> wrote:
>> Chris Plummer has updated the pull request incrementally with one additional
>> commit since the last revision:
>>
>> Fix comment
>
> test/hotspot/jtreg/serviceability/sa/ClhsdbLauncher.java line 149:
>
>> 147: // Make sure no -Xcheck:jni failures. WARNING: JNI local refs
>> 148: oa.shouldNotMatch("^WARNING: JNI local refs:.*$");
>> 149: oa.shouldNotMatch("^WARNING in native method:.*$");
>
> It's not clear to me why this matcher is being done without any tests using
> `-Xcheck:jni`. Is this intentional?
Although no Clhsdb test is explicitly always runs with `-Xcheck:jni`, the
option can be added to any test run. For example:
`$ make test TEST=open/test/hotspot/jtreg/serviceability/sa/
TEST_VM_OPTS="-Xcheck:jni"`
This matching is done to make sure there are no warnings when the test is run
in this manner. The matching could be conditional on the test being run with
`-Xcheck:jni`, but I don't really see to point in cluttering up the logic with
such a check since the warnings should never appear, whether or not you are
using `-Xcheck:jni`.
-------------
PR: https://git.openjdk.java.net/jdk/pull/2568