Skip to content

Conversation

@sormuras
Copy link
Member

@sormuras sormuras commented Jul 11, 2025

Please review the change to update to using jtreg 8.

The primary change is to the jib-profiles.js file, which specifies the version of jtreg to use, for those systems that rely on this file. In addition, the requiredVersion has been updated in the various TEST.ROOT files.


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-8361950: Update to use jtreg 8 (Enhancement - P3)

Reviewers

Reviewing

Using git

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

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

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 26261

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

Using diff file

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

Using Webrev

Link to Webrev Comment

@bridgekeeper
Copy link

bridgekeeper bot commented Jul 11, 2025

👋 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

openjdk bot commented Jul 11, 2025

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

8361950: Update to use jtreg 8

Reviewed-by: jpai, iris, joehw, erikj, ihse, liach, alanb

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 26 new commits pushed to 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 Jul 11, 2025
@openjdk
Copy link

openjdk bot commented Jul 11, 2025

@sormuras The following labels will be automatically applied to this pull request:

  • build
  • compiler
  • core-libs
  • hotspot

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

@openjdk openjdk bot added build build-dev@openjdk.org hotspot hotspot-dev@openjdk.org core-libs core-libs-dev@openjdk.org compiler compiler-dev@openjdk.org labels Jul 11, 2025
@mlbridge
Copy link

mlbridge bot commented Jul 11, 2025

Webrevs

@sormuras sormuras changed the title JDK-8289798: Update to use jtreg 8 JDK-8361950: Update to use jtreg 8 Jul 11, 2025
@openjdk openjdk bot changed the title JDK-8361950: Update to use jtreg 8 8361950: Update to use jtreg 8 Jul 11, 2025
@openjdk openjdk bot added the ready Pull request is ready to be integrated label Jul 11, 2025
Copy link
Member

@JoeWang-Java JoeWang-Java left a comment

Choose a reason for hiding this comment

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

test/jaxp/TEST.ROOT looks good.

Copy link
Member

@jaikiran jaikiran left a comment

Choose a reason for hiding this comment

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

This looks good to me.

@shqking
Copy link
Contributor

shqking commented Jul 30, 2025

Hi, I encountered two jtreg failures with this new version 8 on both AArch64 and x86_64 platforms.
Note that these two jtreg cases can pass with jtreg 7.5.2+1 version.

some details

JDK source: master
jtreg version: 8+2 version
JDK build: fastdebug
OS: ubuntu 24.04
two jtreg test cases

test/jdk/java/security/SignedJar/spi-calendar-provider/TestSPISigned.java
test/hotspot/jtreg/vmTestbase/nsk/jvmti/ResourceExhausted/resexhausted003/TestDescription.java

how to reproduce:

make test TEST="test/jdk/java/security/SignedJar/spi-calendar-provider/TestSPISigned.java"
make test TEST=test/hotspot/jtreg/vmTestbase/nsk/jvmti/ResourceExhausted/resexhausted003/TestDescription.java

the snippet of error log for case TestSPISigned.java on AArch64

STDERR:                                                                                                                                                                                                                                                      
java.nio.file.NoSuchFileException: /tmp/build-fastdebug/test-support/jtreg_test_jdk_java_security_SignedJar_spi_calendar_provider_TestSPISigned_java/classes/0/java/security/SignedJar/spi-calendar-provider/TestSPISigned.d/../provider/.                   
        at java.base/sun.nio.fs.UnixException.translateToIOException(UnixException.java:92)                                   
        at java.base/sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:106)
        at java.base/sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:111)
        at java.base/sun.nio.fs.UnixFileAttributeViews$Basic.readAttributes(UnixFileAttributeViews.java:57)
        at java.base/sun.nio.fs.UnixFileSystemProvider.readAttributes(UnixFileSystemProvider.java:161)
        at java.base/sun.nio.fs.LinuxFileSystemProvider.readAttributes(LinuxFileSystemProvider.java:99)
        at java.base/java.nio.file.Files.readAttributes(Files.java:1702)
        at java.base/java.nio.file.FileTreeWalker.getAttributes(FileTreeWalker.java:216)                                                                                                                                                                     
        at java.base/java.nio.file.FileTreeWalker.visit(FileTreeWalker.java:268)   
        at java.base/java.nio.file.FileTreeWalker.walk(FileTreeWalker.java:306)                                                                                                                                                                              
        at java.base/java.nio.file.FileTreeIterator.<init>(FileTreeIterator.java:69)                                          
        at java.base/java.nio.file.Files.find(Files.java:3649)                                                                
        at jdk.test.lib.util.JarUtils.findAllRegularFiles(JarUtils.java:425)                                                                                                                                                                                 
        at jdk.test.lib.util.JarUtils.createJarFile(JarUtils.java:75)                                                         
        at jdk.test.lib.util.JarUtils.createJarFile(JarUtils.java:106)                                                        
        at jdk.test.lib.util.JarUtils.createJarFile(JarUtils.java:115)                                                        
        at TestSPISigned.main(TestSPISigned.java:84)                                                                                                                                                                                                         
        at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:104)              
        at java.base/java.lang.reflect.Method.invoke(Method.java:565)                                                         
        at com.sun.javatest.regtest.agent.MainActionHelper$AgentVMRunnable.run(MainActionHelper.java:335)                                                                                                                                                            at java.base/java.lang.Thread.run(Thread.java:1474)
                                                                                                                                                                                                                                                             
JavaTest Message: Test threw exception: java.nio.file.NoSuchFileException                                                     
JavaTest Message: shutting down test                 
                                                               
                                                                                                                                                                                                                                                             
TEST RESULT: Failed. Execution failed: `main' threw exception: java.nio.file.NoSuchFileException: /tmp/build-fastdebug/test-support/jtreg_test_jdk_java_security_SignedJar_spi_calendar_provider_TestSPISigned_java/classes/0/java/security/SignedJar/spi-cal
endar-provider/TestSPISigned.d/../provider/.
--------------------------------------------------
Test results: failed: 1   

@jaikiran
Copy link
Member

Hello Hao,

Hi, I encountered two jtreg failures with this new version 8 on both AArch64 and x86_64 platforms.
Note that these two jtreg cases can pass with jtreg 7.5.2+1 version.

Thank you for bringing this up. I'm able to reproduce this issue with this newer version of jtreg. I'll take a look to see what's going on.

@shqking
Copy link
Contributor

shqking commented Aug 1, 2025

Hello Hao,

Hi, I encountered two jtreg failures with this new version 8 on both AArch64 and x86_64 platforms.
Note that these two jtreg cases can pass with jtreg 7.5.2+1 version.

Thank you for bringing this up. I'm able to reproduce this issue with this newer version of jtreg. I'll take a look to see what's going on.

Thanks for your confirm, Jaikiran.
Forgot to mention that I tested jdk_all, hotspot_all, langtools_all with jtreg 8 and only found these two test failures.

@sormuras
Copy link
Member Author

sormuras commented Aug 5, 2025

Both tests seem to make hard assumptions on where binary files of @library classes are stored.

The storage location changed due to https://bugs.openjdk.org/browse/CODETOOLS-7902847 - it might change again in the near future. Thus, both tests need to be updated to work correctly without relying on a specific location of compiled library classes.

@sormuras
Copy link
Member Author

I updated both tests to be agnostic about the location to where jtreg puts library classes into. See also: https://openjdk.org/jtreg/faq.html#how-do-i-find-the-path-for-the-testng-or-junit-jar-files

@openjdk openjdk bot removed the ready Pull request is ready to be integrated label Aug 11, 2025
@openjdk openjdk bot added the ready Pull request is ready to be integrated label Aug 11, 2025
@matias9927
Copy link
Contributor

Is there an ETA for integration? There are new tests for Valhalla that are disabled because they rely on some of the new features in JTREG 8. We are working to reinforce testing and are really looking forward to this patch so we can merge it from mainline to lworld.

@sormuras
Copy link
Member Author

Is there an ETA for integration?

On September, 1st.

@AlanBateman
Copy link
Contributor

Is there an ETA for integration?

On September, 1st.

I had a brief discussion with Christian about maybe holding off until the TIMEOUT_FACTOR changes (pull/26749) is integrated.

@liach
Copy link
Member

liach commented Sep 6, 2025

#26749 was merged 4 days ago. Can we integrate this one now?

@AlanBateman
Copy link
Contributor

#26749 was merged 4 days ago. Can we integrate this one now?

I think it would be useful to get input from @dholmes-ora and @lkorinth before doing this. There seems to be several timeout issues in the last few days, a few follow-on changes to adjust the timeout of a few tests, and a spate of tests being reported as timed out after passing. Updating jtreg adds another change to the picture.

@dholmes-ora
Copy link
Member

I would appreciate it if this could hold off a while longer as we have a few issues causing noise in our testing at the moment and I don't want to muddy the waters even further. Thanks.

@dholmes-ora
Copy link
Member

I'm happy to see this go in now. Thanks

Copy link
Contributor

@AlanBateman AlanBateman left a comment

Choose a reason for hiding this comment

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

I assume you'll do another run of all tiers before integrating.

@sormuras
Copy link
Member Author

sormuras commented Sep 17, 2025

I assume you'll do another run of all tiers before integrating.

Yes. A run of tier 1-8 is in progress, with tier 1-5 already looking very promising.

@openjdk openjdk bot removed the ready Pull request is ready to be integrated label Sep 18, 2025
Copy link
Member

@jaikiran jaikiran left a comment

Choose a reason for hiding this comment

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

The latest changes in fd7bf6f look good to me.

@openjdk openjdk bot added the ready Pull request is ready to be integrated label Sep 18, 2025
@sormuras
Copy link
Member Author

/integrate

@openjdk
Copy link

openjdk bot commented Sep 18, 2025

Going to push as commit 5db1dfe.
Since your change was applied there have been 32 commits pushed to the master branch:

Your commit was automatically rebased without conflicts.

@openjdk openjdk bot added the integrated Pull request has been integrated label Sep 18, 2025
@openjdk openjdk bot closed this Sep 18, 2025
@openjdk openjdk bot removed ready Pull request is ready to be integrated rfr Pull request is ready for review labels Sep 18, 2025
@openjdk
Copy link

openjdk bot commented Sep 18, 2025

@sormuras Pushed as commit 5db1dfe.

💡 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

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

Development

Successfully merging this pull request may close these issues.