Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8242463

ProcessTools.createNativeTestProcessBuilder() in testlib needs jdk/bin on PATH on Windows

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • P3
    • 15
    • 15
    • hotspot
    • b19
    • windows

    Description

      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. The test 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.

      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.

      Attachments

        Activity

          People

            erikj Erik Joelsson
            erikj Erik Joelsson
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: