RFR: 8261753: Test java/lang/System/OsVersionTest.java still failing on BigSur patch versions after JDK-8253702

classic Classic list List threaded Threaded
8 messages Options
Reply | Threaded
Open this post in threaded view
|

RFR: 8261753: Test java/lang/System/OsVersionTest.java still failing on BigSur patch versions after JDK-8253702

Christoph Langer
After the fix for JDK-8253702, the test java/lang/System/OsVersionTest.java still fails on BigSur versions that have a patch version (> 1), e.g. on macOS Big Sur 11.2.1, and where the JDK was built with xcode < 12.

java.lang.Error: 11.2 != 11.2.1

This is a proposal to relax the test and throw a SkippedException in such cases.

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

Commit messages:
 - JDK-8261753

Changes: https://git.openjdk.java.net/jdk/pull/2576/files
 Webrev: https://webrevs.openjdk.java.net/?repo=jdk&pr=2576&range=00
  Issue: https://bugs.openjdk.java.net/browse/JDK-8261753
  Stats: 14 lines in 1 file changed: 12 ins; 0 del; 2 mod
  Patch: https://git.openjdk.java.net/jdk/pull/2576.diff
  Fetch: git fetch https://git.openjdk.java.net/jdk pull/2576/head:pull/2576

PR: https://git.openjdk.java.net/jdk/pull/2576
Reply | Threaded
Open this post in threaded view
|

Re: RFR: 8261753: Test java/lang/System/OsVersionTest.java still failing on BigSur patch versions after JDK-8253702

Christoph Langer
On Mon, 15 Feb 2021 13:27:36 GMT, Christoph Langer <[hidden email]> wrote:

> After the fix for JDK-8253702, the test java/lang/System/OsVersionTest.java still fails on BigSur versions that have a patch version (> 1), e.g. on macOS Big Sur 11.2.1, and where the JDK was built with xcode < 12.
>
> java.lang.Error: 11.2 != 11.2.1
>
> This is a proposal to relax the test and throw a SkippedException in such cases.

Throwing a SkippedException upon the special failure condition is just one possible suggestion. Alternatively we can also allow this as success condition.
I'm also wondering whether we should run this test with the various possibilities for SYSTEM_VERSION_COMPAT settings.

All under the assumption that we can't figure out the patch version of the macOS we run on.

Thoughts?

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

PR: https://git.openjdk.java.net/jdk/pull/2576
Reply | Threaded
Open this post in threaded view
|

Re: RFR: 8261753: Test java/lang/System/OsVersionTest.java still failing on BigSur patch versions after JDK-8253702

Roger Riggs-2
On Mon, 15 Feb 2021 13:40:26 GMT, Christoph Langer <[hidden email]> wrote:

>> After the fix for JDK-8253702, the test java/lang/System/OsVersionTest.java still fails on BigSur versions that have a patch version (> 1), e.g. on macOS Big Sur 11.2.1, and where the JDK was built with xcode < 12.
>>
>> java.lang.Error: 11.2 != 11.2.1
>>
>> This is a proposal to relax the test and throw a SkippedException in such cases.
>
> Throwing a SkippedException upon the special failure condition is just one possible suggestion. Alternatively we can also allow this as success condition.
> I'm also wondering whether we should run this test with the various possibilities for SYSTEM_VERSION_COMPAT settings.
>
> All under the assumption that we can't figure out the patch version of the macOS we run on.
>
> Thoughts?

Given the lack of veracity from the os...
Perhaps check that `swVersion.startsWith(osVersion) == true` (if the whole string doesn't match).

I'm hopeful that when JDK 17 is released the toolchain has been upgraded and this patch won't be necessary.
But if someone suggests backporting it, then a more through testing is needed.

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

PR: https://git.openjdk.java.net/jdk/pull/2576
Reply | Threaded
Open this post in threaded view
|

Re: RFR: 8261753: Test java/lang/System/OsVersionTest.java still failing on BigSur patch versions after JDK-8253702

Christoph Langer
On Mon, 15 Feb 2021 14:06:31 GMT, Roger Riggs <[hidden email]> wrote:

> Given the lack of veracity from the os...
> Perhaps check that `swVersion.startsWith(osVersion) == true` (if the whole string doesn't match).
>
> I'm hopeful that when JDK 17 is released the toolchain has been upgraded and this patch won't be necessary.
> But if someone suggests backporting it, then a more through testing is needed.

the .startsWith is a good suggestion which simplifies the code. I'll change this.

As for the patch I think it will be necessary for a while. I for one want to backport it to JDK11 sine it hits there, too. And even if for JDK 17 we decide to build with a newer toolchain older toolchains might still be supported

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

PR: https://git.openjdk.java.net/jdk/pull/2576
Reply | Threaded
Open this post in threaded view
|

Re: RFR: 8261753: Test java/lang/System/OsVersionTest.java still failing on BigSur patch versions after JDK-8253702 [v2]

Christoph Langer
In reply to this post by Christoph Langer
> After the fix for JDK-8253702, the test java/lang/System/OsVersionTest.java still fails on BigSur versions that have a patch version (> 1), e.g. on macOS Big Sur 11.2.1, and where the JDK was built with xcode < 12.
>
> java.lang.Error: 11.2 != 11.2.1
>
> This is a proposal to relax the test and throw a SkippedException in such cases.

Christoph Langer has updated the pull request incrementally with one additional commit since the last revision:

  Simplify the coding, use startsWith comparison

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

Changes:
  - all: https://git.openjdk.java.net/jdk/pull/2576/files
  - new: https://git.openjdk.java.net/jdk/pull/2576/files/6c52a6db..f06114c9

Webrevs:
 - full: https://webrevs.openjdk.java.net/?repo=jdk&pr=2576&range=01
 - incr: https://webrevs.openjdk.java.net/?repo=jdk&pr=2576&range=00-01

  Stats: 8 lines in 1 file changed: 0 ins; 5 del; 3 mod
  Patch: https://git.openjdk.java.net/jdk/pull/2576.diff
  Fetch: git fetch https://git.openjdk.java.net/jdk pull/2576/head:pull/2576

PR: https://git.openjdk.java.net/jdk/pull/2576
Reply | Threaded
Open this post in threaded view
|

Re: RFR: 8261753: Test java/lang/System/OsVersionTest.java still failing on BigSur patch versions after JDK-8253702 [v2]

Roger Riggs-2
On Mon, 15 Feb 2021 15:07:55 GMT, Christoph Langer <[hidden email]> wrote:

>> After the fix for JDK-8253702, the test java/lang/System/OsVersionTest.java still fails on BigSur versions that have a patch version (> 1), e.g. on macOS Big Sur 11.2.1, and where the JDK was built with xcode < 12.
>>
>> java.lang.Error: 11.2 != 11.2.1
>>
>> This is a proposal to relax the test and throw a SkippedException in such cases.
>
> Christoph Langer has updated the pull request incrementally with one additional commit since the last revision:
>
>   Simplify the coding, use startsWith comparison

Marked as reviewed by rriggs (Reviewer).

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

PR: https://git.openjdk.java.net/jdk/pull/2576
Reply | Threaded
Open this post in threaded view
|

Re: RFR: 8261753: Test java/lang/System/OsVersionTest.java still failing on BigSur patch versions after JDK-8253702 [v3]

Christoph Langer
In reply to this post by Christoph Langer
> After the fix for JDK-8253702, the test java/lang/System/OsVersionTest.java still fails on BigSur versions that have a patch version (> 1), e.g. on macOS Big Sur 11.2.1, and where the JDK was built with xcode < 12.
>
> java.lang.Error: 11.2 != 11.2.1
>
> This is a proposal to relax the test and throw a SkippedException in such cases.

Christoph Langer has updated the pull request incrementally with one additional commit since the last revision:

  Update copyright year

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

Changes:
  - all: https://git.openjdk.java.net/jdk/pull/2576/files
  - new: https://git.openjdk.java.net/jdk/pull/2576/files/f06114c9..9fe46d7b

Webrevs:
 - full: https://webrevs.openjdk.java.net/?repo=jdk&pr=2576&range=02
 - incr: https://webrevs.openjdk.java.net/?repo=jdk&pr=2576&range=01-02

  Stats: 1 line in 1 file changed: 0 ins; 0 del; 1 mod
  Patch: https://git.openjdk.java.net/jdk/pull/2576.diff
  Fetch: git fetch https://git.openjdk.java.net/jdk pull/2576/head:pull/2576

PR: https://git.openjdk.java.net/jdk/pull/2576
Reply | Threaded
Open this post in threaded view
|

Integrated: 8261753: Test java/lang/System/OsVersionTest.java still failing on BigSur patch versions after JDK-8253702

Christoph Langer
In reply to this post by Christoph Langer
On Mon, 15 Feb 2021 13:27:36 GMT, Christoph Langer <[hidden email]> wrote:

> After the fix for JDK-8253702, the test java/lang/System/OsVersionTest.java still fails on BigSur versions that have a patch version (> 1), e.g. on macOS Big Sur 11.2.1, and where the JDK was built with xcode < 12.
>
> java.lang.Error: 11.2 != 11.2.1
>
> This is a proposal to relax the test and throw a SkippedException in such cases.

This pull request has now been integrated.

Changeset: 8ba390d1
Author:    Christoph Langer <[hidden email]>
URL:       https://git.openjdk.java.net/jdk/commit/8ba390d1
Stats:     10 lines in 1 file changed: 7 ins; 0 del; 3 mod

8261753: Test java/lang/System/OsVersionTest.java still failing on BigSur patch versions after JDK-8253702

Reviewed-by: rriggs

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

PR: https://git.openjdk.java.net/jdk/pull/2576