[jdk11u-dev] RFR: 8360816: [11u] Use default value for ProgramFiles(x86) in GHA [v6]
Antonio Vieiro
duke at openjdk.org
Fri Jun 27 17:14:42 UTC 2025
On Fri, 27 Jun 2025 17:08:59 GMT, Antonio Vieiro <duke at openjdk.org> wrote:
>> A fix for [JDK-8360816](https://bugs.openjdk.org/browse/JDK-8360816).
>>
>> The `ProgramFiles(x86)` environment variable is not properly propagated to JTReg tests in JDK11, which makes the AOT compiler tests fail on the new `windows-2025` GHA runners, as manifested in the backport of [https://bugs.openjdk.org/browse/JDK-8358538](JDK-8358538).
>>
>> Propagating this environment variable to JTRegs may require creating devkits for Windows 2022, but previous attempts were discarded [JDK-8283723](https://bugs.openjdk.org/browse/JDK-8283723).
>>
>> This fix prints a warning message when this environment variable is not set, and then uses a default value (`C:\Program Files (x86)`) that makes it possible to run the AOT tests with these new `windows-2025` GHA runners. If the `ProgramFiles(x86)` env variable is set the fix has no effect, ensuring the previous behaviour. If the proposed default value is incorrect the AOT tests will continue to fail as before.
>>
>> The PR is on top of https://github.com/openjdk/jdk11u-dev/pull/3052 to verify the fix works as intended with the new `windows-2025` GHA runners.
>
> Antonio Vieiro has updated the pull request incrementally with one additional commit since the last revision:
>
> 8360816: [11u] Use default value for ProgramFiles(x86) in GHA
We cannot add a `ProgramFiles(x86)` environment variable through Github Actions, because JTReg will block it (the list of environment variables that [JTReg passes to tests on Windows is very small](https://github.com/openjdk/jtreg/blob/a02f8b1087097917186ca0d952385324371eb7f1/src/share/classes/com/sun/javatest/regtest/tool/Tool.java#L2466).
We can instead add it directly to the JTReg options using `-eKEY:VALUE`, properly escaping the spaces and the backslashes.
This is cleaner (no changes to product code) but it propagates the environment variable on Linux and MacOS.
-------------
PR Comment: https://git.openjdk.org/jdk11u-dev/pull/3056#issuecomment-3013833401
More information about the jdk-updates-dev
mailing list