Uploaded image for project: 'Code Tools'
  1. Code Tools
  2. CODETOOLS-7904050

DEFAULT_WINDOWS_ENV_VARS could be updated

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Unresolved
    • Icon: P4 P4
    • None
    • None
    • tools
    • None
    • windows

      As in CODETOOLS-7903400, the environment variables that are passed to the tests could be updated.

      The "ProgramFiles(x86)" environment variable is not currently passed to tests, since it's not included in the DEFAULT_WINDOWS_ENV_VARS array ([1]).

      This is problematic for tests that use this variable for locating different tools in Windows. This happened, for instance, in the JDK11 AOT Compiler tests that use the variable to locate the Microsoft Linker (see [2]).

      In these cases it would be useful that the "ProgramFiles(x86)" environment variable is included in the DEFAULT_WINDOWS_ENV_VARS array.

      Some other environment variables that may also be worth whitelisting could be:

      - PROCESSOR_ARCHITECTURE
      - ProgramFiles
      - ProgramW6432
      - CommonProgramFiles
      - CommonProgramW6432

      (as stated in [3]).

      [1]
      https://github.com/openjdk/jtreg/blob/a02f8b1087097917186ca0d952385324371eb7f1/src/share/classes/com/sun/javatest/regtest/tool/Tool.java#L2466

      [2]
      https://github.com/openjdk/jdk11u-dev/blob/0927ca70e66ef27b38cbf5c0dd2851c796218067/src/jdk.aot/share/classes/jdk.tools.jaotc/src/jdk/tools/jaotc/Linker.java#L208

      [3]
      https://learn.microsoft.com/en-us/windows/win32/winprog64/wow64-implementation-details

            Unassigned Unassigned
            avieiro Antonio Vieiro
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: