On Fri, 17 Jan 2025 11:04:09 GMT, Daniel Jeliński <djelin...@openjdk.org> wrote:
>> Brian Burkhalter has updated the pull request incrementally with one >> additional commit since the last revision: >> >> 8347740: Change Windows exceptionExpected to be based on build number > > test/jdk/java/io/File/createTempFile/SpecialTempFile.java line 95: > >> 93: >> 94: String cmd = "Systeminfo"; >> 95: Process p = Runtime.getRuntime().exec(new String[] {cmd}); > > I'm not a big fan of running third-party tools in our tests; did you try > fixing the regex expression? > Replace: `"^.*[11|2025]$"` (character class) -> `"^.*(11|2025)$"` > (alternative strings) No, I replaced it with splitting the OS version string. In any case, would that cover, e.g., the hypothetical cases Windows 27, Windows Server 2038, etc.? Unfortunately Miscrosoft does not provide a reliable API to obtain the build number. `GetVersionEx` is deprecated. [KUSER_SHARED_DATA](https://learn.microsoft.com/en-us/windows-hardware/drivers/ddi/ntddk/ns-ntddk-kuser_shared_data) contains `NtBuildNumber` but some device driver kit has to be installed to use it. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/23117#discussion_r1920468864