On Mon, 15 Feb 2021 17:47:47 GMT, Chris Plummer <[email protected]> wrote:
>> 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`.
OK, I thought so. Could you expand on the comment saying so, please?
Suggestion: `Make sure there are no -Xcheck:jni warnings as -Xcheck:jni might
be set via TEST_VM_OPTS on test runs`.
-------------
PR: https://git.openjdk.java.net/jdk/pull/2568