[jdk17] RFR: 8268591: a few runtime/jni tests don't need `/othervm`
David Holmes
dholmes at openjdk.java.net
Fri Jun 11 12:13:47 UTC 2021
On Fri, 11 Jun 2021 08:31:26 GMT, Igor Ignatyev <iignatyev at openjdk.org> wrote:
> Hi all,
>
> could you please review this small and trivial patch that removes `/othervm` from 3 `runtime/jni` tests?
> from JBS:
>> `runtime/jni/registerNativesWarning/TestRegisterNativesWarning.java`, `checked/TestCheckedEnsureLocalCapacity.java`, and `atExit/TestAtExit.java` use `main/othervm` whereas in fact, they don't need `othervm`, and if we had CODETOOLS-7902658 implemented, they would have used `driver` mode. this RFE is to remove `/othervm`, so we at least won't waste time on creating a fresh JVM.
>
> the patch explicitly sets `-Djava.library.path=` for the child processes so they are able to locate native libraries.
>
> testing: `runtime/jni` on `{linux,windows,macosx}-x64`
>
> Thanks,
> -- Igor
Hi Igor,
The test classes, run by jtreg, load native libraries (though they could possibly be refactored so that is not necessary) so I would expect we would want othervm here because we do not want to load multiple unrelated libraries in the shared VM implied by "main".
I also don't understand why you now need to set java.library.path explicitly in some of the tests ??
Thanks,
David
-------------
PR: https://git.openjdk.java.net/jdk17/pull/18
More information about the hotspot-runtime-dev
mailing list