On Tue, 12 May 2026 19:11:23 GMT, Ashay Rane <[email protected]> wrote:

>> The powershell binary is required to run these tests but in the GitHub
>> workflow that runs tests (specifically, in test.yml), we reset the PATH
>> environment variable on Windows, causing the GitHub workflow to fail if
>> you run these tests.  The tests pass locally since local test runs don't
>> modify PATH.
>> 
>> To make these tests pass in GitHub workflows, this patch updates the
>> tests to refer to PowerShell using the canonical path on Windows.  See
>> https://github.com/raneashay/openjdk-jdk/actions/runs/25680763981/job/75401590988
>> for a sample workflow run of the tier2 part1 tests, which include the
>> CngCipher and DupAlias tests.
>> 
>> ---------
>> - [x] I confirm that I make this contribution in accordance with the 
>> [OpenJDK Interim AI Policy](https://openjdk.org/legal/ai).
>
> Ashay Rane has updated the pull request incrementally with two additional 
> commits since the last revision:
> 
>  - Add missing year to copyright notice.
>  - Move `powerShellPath()` to `jdk.test.lib.os.windows.FileUtils`
>    
>    This avoids having to duplicate the function in individual tests.

test/lib/jdk/test/lib/os/windows/FileUtils.java line 26:

> 24: package jdk.test.lib.os.windows;
> 25: 
> 26: public class FileUtils {

Actually, I think this might better fit in existing 
`jdk/test/lib/util/FileUtils.java`. It's going to be a bit confusing with 2 
FileUtils, especially with windows specific stuff being already in 
`jdk/test/lib/util/FileUtils.java`. 

Alternative would be to move all windows stuff to this file, but this would 
probably be a very large change.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/31127#discussion_r3233730626

Reply via email to