Skip to content

8388347: Remove enablePreview from TestEnableNativeAccessJarManifest#31916

Closed
liach wants to merge 1 commit into
openjdk:masterfrom
liachmodded:cleanup/ffm-jar-manifest-test-preview
Closed

8388347: Remove enablePreview from TestEnableNativeAccessJarManifest#31916
liach wants to merge 1 commit into
openjdk:masterfrom
liachmodded:cleanup/ffm-jar-manifest-test-preview

Conversation

@liach

@liach liach commented Jul 15, 2026

Copy link
Copy Markdown
Member

TestEnableNativeAccessJarManifest has a @enablePreview jtreg directive. This test was added in the commit where FFM became a permanent feature, so its omission was likely an oversight.

Now, this test declares a record, which makes all its class files preview with JEP 401. As a consequence, the command line arguments are no longer sufficient to run the test. We can simply remove @enablePreview to clear this butterfly effect.



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

  • JDK-8388347: Remove enablePreview from TestEnableNativeAccessJarManifest (Bug - P4)

Reviewers

Reviewing

Using git

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

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

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 31916

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

Using diff file

Download this PR as a diff file:
https://git.openjdk.org/jdk/pull/31916.diff

Using Webrev

Link to Webrev Comment

@bridgekeeper

bridgekeeper Bot commented Jul 15, 2026

Copy link
Copy Markdown

👋 Welcome back liach! 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

openjdk Bot commented Jul 15, 2026

Copy link
Copy Markdown

@liach 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:

8388347: Remove enablePreview from TestEnableNativeAccessJarManifest

Reviewed-by: jpai, jvernee

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 1 new commit pushed to the master branch:

  • c4a8cb2: 8387640: vmTestbase/nsk/jdi/EventRequestManager/threadStartRequests/thrstartreq001/TestDescription.java fails intermittently

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 changed the title 8388347 8388347: Remove enablePreview from TestEnableNativeAccessJarManifest Jul 15, 2026
@openjdk openjdk Bot added the core-libs core-libs-dev@openjdk.org label Jul 15, 2026
@openjdk

openjdk Bot commented Jul 15, 2026

Copy link
Copy Markdown

@liach The following label will be automatically applied to this pull request:

  • core-libs

When this pull request is ready to be reviewed, an "RFR" email will be sent to the corresponding mailing list. If you would like to change these labels, use the /label pull request command.

@openjdk openjdk Bot added the rfr Pull request is ready for review label Jul 15, 2026
@mlbridge

mlbridge Bot commented Jul 15, 2026

Copy link
Copy Markdown

Webrevs

@jaikiran

Copy link
Copy Markdown
Member

Hello Chen,

Now, this test declares a record, which makes all its class files preview with JEP 401. As a consequence, the command line arguments are no longer sufficient to run the test.

I don't fully follow what the issue is, especially the part about command line arguments being no longer sufficient. Which command line arguments are those? The exact error(s) this test generates against a JDK that has JEP-401 implementation will be useful to see.

@liach

liach commented Jul 15, 2026

Copy link
Copy Markdown
Member Author

@jaikiran See example excerpt from https://github.com/liach/valhalla/actions/runs/29372000486/job/87221798714#step:10:1993

Error: LinkageError occurred while loading main class TestEnableNativeAccessJarManifest$Reinvoker
	java.lang.UnsupportedClassVersionError: Preview features are not enabled for TestEnableNativeAccessJarManifest$Reinvoker (class file version 72.65535). Try running with '--enable-preview'

In openjdk/valhalla#2643, since this test is @enablePreview and declares a static record, the class files produced by this test are all dependent on preview features, including that for TestEnableNativeAccessJarManifest$Reinvoker. This test tries to invoke this main class without --enable-preview to the Java launcher, causing this test to fail.

@jaikiran

jaikiran commented Jul 15, 2026

Copy link
Copy Markdown
Member

... This test tries to invoke this main class without --enable-preview to the Java launcher, causing this test to fail.

Thank you. So this is about the command line arguments that the test code uses to launch a java program and isn't about the command line arugments that jtreg constructs when launching these test actions.

The remaining @enablePreview jtreg tag in this test seems to be a leftover from a previous effort to clean up this test of --enable-preview usage through https://bugs.openjdk.org/browse/JDK-8345164.

The change in this PR looks good to me.

@jaikiran jaikiran left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Although the change is trivial test-only change, it would be good to wait for a review from either Per @minborg or Jorn @JornVernee before integrating.

@openjdk openjdk Bot added the ready Pull request is ready to be integrated label Jul 15, 2026
@liach

liach commented Jul 15, 2026

Copy link
Copy Markdown
Member Author

Thanks for the reviews! I will integrate sooner since this has limited impact and mach5 seems good.

/integrate

@openjdk

openjdk Bot commented Jul 15, 2026

Copy link
Copy Markdown

Going to push as commit 2659bfe.
Since your change was applied there has been 1 commit pushed to the master branch:

  • c4a8cb2: 8387640: vmTestbase/nsk/jdi/EventRequestManager/threadStartRequests/thrstartreq001/TestDescription.java fails intermittently

Your commit was automatically rebased without conflicts.

@openjdk openjdk Bot added the integrated Pull request has been integrated label Jul 15, 2026
@openjdk openjdk Bot closed this Jul 15, 2026
@openjdk openjdk Bot removed ready Pull request is ready to be integrated rfr Pull request is ready for review labels Jul 15, 2026
@openjdk

openjdk Bot commented Jul 15, 2026

Copy link
Copy Markdown

@liach Pushed as commit 2659bfe.

💡 You may see a message that your pull request was closed with unmerged commits. This can be safely ignored.

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

Labels

core-libs core-libs-dev@openjdk.org integrated Pull request has been integrated

Development

Successfully merging this pull request may close these issues.

3 participants