RFR: 7903160: Run self-tests for jtreg on MacOS and Windows [v10]
Christian Stein
cstein at openjdk.java.net
Sat Apr 23 13:22:49 UTC 2022
On Wed, 20 Apr 2022 15:56:38 GMT, Christian Stein <cstein at openjdk.org> wrote:
>> make/CheckJavaOSVersion.java line 37:
>>
>>> 35: private static void checkJavaOSVersion(String expectVersion) {
>>> 36: String osVersion = System.getProperty("os.version");
>>> 37: if (!osVersion.startsWith(expectVersion)) {
>>
>> This change seems questionable.
>>
>> `os.version` is supposed to reflect (`.equals`) the OS version. We should at least understand why it is being reporting as a leading substring.
>> Instead of `.startsWith`, consider `.matches` with a pattern that allows optional trailing dotted digits.
>
> Could be related to https://bugs.openjdk.java.net/browse/JDK-8269850
>
> The [error message](https://github.com/openjdk/jtreg/runs/6034597187?check_suite_focus=true#step:6:197) reported in the logs reads:
Added an explanatory comment.
-------------
PR: https://git.openjdk.java.net/jtreg/pull/75
More information about the jtreg-dev
mailing list