Skip to content

7904172: JTReg should add --enable-native-access=ALL-UNNAMED in /native actions#319

Open
sormuras wants to merge 6 commits intoopenjdk:masterfrom
sormuras:CODETOOLS-7904172-native-all-unnamed
Open

7904172: JTReg should add --enable-native-access=ALL-UNNAMED in /native actions#319
sormuras wants to merge 6 commits intoopenjdk:masterfrom
sormuras:CODETOOLS-7904172-native-all-unnamed

Conversation

@sormuras
Copy link
Copy Markdown
Member

@sormuras sormuras commented Apr 10, 2026

Please review this change adding --enable-native-access=ALL-UNNAMED to the list of Java test runtime command-line arguments for actions with /native option -- unless there is one or more explicit custom --enable-native-access arguments present.


Progress

  • Change must be properly reviewed (1 review required, with at least 1 Reviewer)
  • Change must not contain extraneous whitespace
  • Commit message must refer to an issue

Issue

  • CODETOOLS-7904172: JTReg should add --enable-native-access=ALL-UNNAMED in /native actions (Enhancement - P3)

Reviewers

Reviewing

Using git

Checkout this PR locally:
$ git fetch https://git.openjdk.org/jtreg.git pull/319/head:pull/319
$ git checkout pull/319

Update a local copy of the PR:
$ git checkout pull/319
$ git pull https://git.openjdk.org/jtreg.git pull/319/head

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 319

View PR using the GUI difftool:
$ git pr show -t 319

Using diff file

Download this PR as a diff file:
https://git.openjdk.org/jtreg/pull/319.diff

Using Webrev

Link to Webrev Comment

@bridgekeeper
Copy link
Copy Markdown

bridgekeeper Bot commented Apr 10, 2026

👋 Welcome back cstein! A progress list of the required criteria for merging this PR into master will be added to the body of your pull request. There are additional pull request commands available for use with this pull request.

@openjdk
Copy link
Copy Markdown

openjdk Bot commented Apr 10, 2026

@sormuras This change now passes all automated pre-integration checks.

ℹ️ This project also has non-automated pre-integration requirements. Please see the file CONTRIBUTING.md for details.

After integration, the commit message for the final commit will be:

7904172: JTReg should add --enable-native-access=ALL-UNNAMED in /native actions

Reviewed-by: lmesnik, iris

You can use pull request commands such as /summary, /contributor and /issue to adjust it as needed.

At the time when this comment was updated there had been 2 new commits pushed to the master branch:

  • cef4547: 7904176: JTReg should find inherited main methods
  • 7c8ef07: 7904177: Add pull request template for openjdk/jtreg

Please see this link for an up-to-date comparison between the source branch of this pull request and the master branch.
As there are no conflicts, your changes will automatically be rebased on top of these commits when integrating. If you prefer to avoid this automatic rebasing, please check the documentation for the /integrate command for further details.

➡️ To integrate this PR with the above commit message to the master branch, type /integrate in a new comment.

@openjdk openjdk Bot added the rfr Pull request is ready for review label Apr 10, 2026
@mlbridge
Copy link
Copy Markdown

mlbridge Bot commented Apr 10, 2026

Webrevs

@sormuras
Copy link
Copy Markdown
Member Author

sormuras commented Apr 10, 2026

Running bash build/make.sh testnativepath works fine in GH Codespaces. 🤔

Ah, Module#isNativeAccessEnabled() was added in Java 22.

And --enable-native-access was introduce in Java 17.

Copy link
Copy Markdown
Member

@lmesnik lmesnik left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think that fix looks good and useful.

Copy link
Copy Markdown
Member

@irisclark irisclark left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are planning to eventually provide support for explicitly named modules (i.e. --enable-native-access module[,module...], see java mapage)?

You might want to call out this /native option in the Tag Specification?

@openjdk openjdk Bot added the ready Pull request is ready to be integrated label Apr 15, 2026
@sormuras
Copy link
Copy Markdown
Member Author

Thanks for all the reviews and the approval, Iris!

Are planning to eventually provide support for explicitly named modules (i.e. --enable-native-access module[,module...], see java mapage)?

No, not yet. You may continue to do so via an explicit listing in the (VM) options arguments. Hence the "seenEnableNativeAccess" logic in this PR.

You might want to call out this /native option in the Tag Specification?

Right. Will add it to the spec (and FAQ).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ready Pull request is ready to be integrated rfr Pull request is ready for review

Development

Successfully merging this pull request may close these issues.

3 participants