Uploaded image for project: 'Code Tools'
  1. Code Tools
  2. CODETOOLS-7904045

Remove the macOS version check from jtreg

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Fixed
    • Icon: P3 P3
    • jtreg7.6
    • jtreg7.5.2
    • tools
    • None

      In CODETOOLS-7903088, a check was introduced the jtreg tool to compare the version reported by macOS's sw_vers tool and the version reported by the os.version system property in Java. The PR which introduced this change noted https://github.com/openjdk/jtreg/pull/48:

      > There was one gotcha in moving to a newer JDK. Some older versions/updates of JDK do not set the correct value of the system property os.version on a Mac. This is fixed in JDK 17, and the fix has been back ported to most versions from 11 to 16. For now, there are various checks in the build.sh script, the Makefile, and in jtreg itself, to make sure it does not detect the bug in the JDK used to build or run jtreg. This code can be removed when we move forward (again, later) to using JDK 17 to build jtreg, but for now, "baby steps".

      The original issue in the JDK for which this check was introduced has been fixed in all relevant version of the JDK including Java 11.

      A few weeks back macOS released a newer Beta version of that OS. The previous macOS release was 15.x and the newer version number is 26.x. Some of the tools in macOS ecosystem, like the XCode 15.4 used to build the JDK, still report this version as 16.x. This causes a mismatch in the version reported by JDK and that reported by sw_vers tool. A fix in the JDK mainline is currently in progress to have the os.version system property have the correct value for this macOS version https://bugs.openjdk.org/browse/JDK-8359830.

      However, given the current check in jtreg and the fact that the jtreg tool exits when it finds this mismatch, it makes it impossible to do run any tests on this newer version of macOS using JDK versions which don't have this fix. Furthermore, the JDK testsuite already has the necessary regression tests that will catch this version mismatch and report a failure (only) in that test. So any mismatch will be rightly caught in those tests and at the same time will let the rest of the testing to proceed. So I think we should not enforce these checks in jtreg and instead require the JDK project itself have the necessary tests to verify that they report the correct os.version.

            jpai Jaikiran Pai
            jpai Jaikiran Pai
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: