[jdk17] RFR: 8268591: a few runtime/jni tests don't need `/othervm`

Igor Ignatyev iignatyev at openjdk.java.net
Fri Jun 11 13:06:50 UTC 2021


On Fri, 11 Jun 2021 12:46:31 GMT, Igor Ignatyev <iignatyev at openjdk.org> wrote:

>> I also don't understand why you now need to set java.library.path explicitly in some of the tests ??
> frankly, I don't fully understand why it's needed, but these tests started to fail w/ `UnsatisfiedLinkError` when I removed `/othervm` and setting `java.library.path` fixed the problem. I assumed it's because we don't set/propagate `LD_LIBRARY_PATH` (or its equivalent), yet all my attempts to reproduce this behavior and the problem w/ a small test case failed, I'll dig deeper next week.

reproduced, as I assumed `LD_LIBRARY_PATH` isn't set in case of `@run main` and hence it doesn't get propagated to a spawn JVM which causes ULE. the reason I wasn't able to reproduce that before is the fact that `othervm` is a default mode and I didn't have `-agentvm` in my command line ��‍♂️

-- Igor

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

PR: https://git.openjdk.java.net/jdk17/pull/18


More information about the hotspot-runtime-dev mailing list