RFR: 7904045: Remove the macOS version check from jtreg

Jaikiran Pai jpai at openjdk.org
Tue Jun 24 07:54:53 UTC 2025


Can I please get a review of this change which proposes to remove the macOS version check in jtreg tool? As noted in https://bugs.openjdk.org/browse/CODETOOLS-7904045, the current check results in jtreg exiting the process if it finds a mismatch in the macOS version reported by `sw_vers` tool and the one reported by Java's `os.version` system property. This makes it impossible to launch jtreg to run any tests on macOS 26 (currently in Beta). Even a fix in the JDK (through https://bugs.openjdk.org/browse/JDK-8359830) won't be enough because older versions of the JDK that could be used to launch the jtreg process will still cause this check to fail in jtreg.

The check itself isn't necessary within jtreg and that version check should instead reside as a regression test within the JDK repo. In fact there's already a regression test in JDK which catches these issues related to incorrect os.version reporting. Having this check in jtreg (that too only for macOS) prevents the tool from being used on these newer versions of macOS. In fact, jtreg itself cannot be built (with JDK 17) on macOS 26 (beta) due to this check.

The commit in this PR removes the check. I have run this change against macOS 26 (beta) where the tool would previously exit. The self-tests now all pass on that host:


All (     234) selected tests completed successfully

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

Commit messages:
 - 7904045: Remove the macOS version check from jtreg

Changes: https://git.openjdk.org/jtreg/pull/268/files
  Webrev: https://webrevs.openjdk.org/?repo=jtreg&pr=268&range=00
  Issue: https://bugs.openjdk.org/browse/CODETOOLS-7904045
  Stats: 118 lines in 4 files changed: 0 ins; 115 del; 3 mod
  Patch: https://git.openjdk.org/jtreg/pull/268.diff
  Fetch: git fetch https://git.openjdk.org/jtreg.git pull/268/head:pull/268

PR: https://git.openjdk.org/jtreg/pull/268


More information about the jtreg-dev mailing list