RFR: JDK-8242463: ProcessTools.createNativeTestProcessBuilder() in testlib needs jdk/bin on PATH on Windows
Igor Ignatyev
igor.ignatyev at oracle.com
Thu Apr 9 15:55:24 UTC 2020
Hi Erik,
looks good to me.
-- Igor
> On Apr 9, 2020, at 8:15 AM, Erik Joelsson <erik.joelsson at oracle.com> wrote:
>
> The test open/test/hotspot/jtreg/testlibrary_tests/process/TestNativeProcessBuilder.java fails when building the JDK with VS2019. More specifically, it fails if the JDK under test is built with a different version of VS than the boot JDK.
>
> The cause of this is in how the PATH is setup. ProcessTools adds the jdk/bin/server dir to PATH so that jvm.dll can be loaded, but it omits the jdk/bin dir where the VS runtime dlls are located. If the boot JDK happens to have the same runtime dlls (or if the OS has them installed) those may be on the path and save the situation accidentally, which is what regularly happens in Oracle automated testing today.
>
> I think the proper fix to this is to add jdk/bin to the PATH on Windows, and also to change the order so that jdk/bin and jdk/bin/server are prepended rather than appended to the PATH. This way we minimize the risk of the environment affecting tests in any way.
>
> Bug: https://bugs.openjdk.java.net/browse/JDK-8242463
>
> Webrev: http://cr.openjdk.java.net/~erikj/8242463/webrev.01/index.html
>
> /Erik
>
More information about the build-dev
mailing list