jdk icon indicating copy to clipboard operation
jdk copied to clipboard

8373654: Tests in sources/ should only run once

Open dholmes-ora opened this issue 1 month ago • 6 comments

This test is checking for backsliding on the use of NULL in the hotspot source files. The test only needs to be run once per change but it is defined as a regular tier1 test which then gets run for each os-arch combination, plus product and debug, and then again with a bunch of flags in tier3. This is just a waste of resources. At a minimum we should make the test flagless so that it doesn't run in tier3, but we can also restrict it to a single platform.

Before the change the test ran 27 times in tier1-3 in our CI. After it runs once.

EDIT: Updated to include both tests in sources/

Thanks


Progress

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

Issue

  • JDK-8373654: Tests in sources/ should only run once (Enhancement - P4)

Reviewing

Using git

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

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

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 28818

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

Using diff file

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

Using Webrev

Link to Webrev Comment

dholmes-ora avatar Dec 15 '25 06:12 dholmes-ora

:wave: Welcome back dholmes! 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.

bridgekeeper[bot] avatar Dec 15 '25 06:12 bridgekeeper[bot]

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

8373654: Tests in sources/ should only run once

Reviewed-by: shade, lmesnik

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 54 new commits pushed to the master branch:

  • e75726ee03ca4664827ca5d680c02bcf2a96f4ea: 8373832: Test java/lang/invoke/TestVHInvokerCaching.java tests nothing
  • f3a48560b5e3a280f6f76031eb3d475ff9ee49f4: 8373807: test/jdk/java/net/httpclient/websocket/DummyWebSocketServer.java getURI() uses "localhost"
  • 4e05748f0899cabb235c71ecdf4256d4ad137a0d: 8373716: Refactor further java/util tests from TestNG to JUnit
  • ... and 51 more: https://git.openjdk.org/jdk/compare/0e7bc6b0928bd860c665ead26d2237055c0c9d27...master

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[bot] avatar Dec 15 '25 06:12 openjdk[bot]

@dholmes-ora To determine the appropriate audience for reviewing this pull request, one or more labels corresponding to different subsystems will normally be applied automatically. However, no automatic labelling rule matches the changes in this pull request. In order to have an "RFR" email sent to the correct mailing list, you will need to add one or more applicable labels manually using the /label pull request command.

Applicable Labels
  • build
  • client
  • compiler
  • core-libs
  • hotspot
  • hotspot-compiler
  • hotspot-gc
  • hotspot-jfr
  • hotspot-runtime
  • i18n
  • ide-support
  • javadoc
  • jdk
  • jmx
  • net
  • nio
  • security
  • serviceability
  • shenandoah

openjdk[bot] avatar Dec 15 '25 06:12 openjdk[bot]

/label add hotspot

Thanks for taking a look @shipilev !

linux and amd64 -- as someone who re-runs this test on my M1 Mac to reproduce CI failures, I disagree!

Reality is that for every changeset integrated only one entity in the world actually needs to run this test. But I can drop the platform restriction - 4 runs is still better than 27.

You might want to do this for other sources/ tests?

I'll take a look at what they do. I only tripped over this one when a stray file caused it to fail.

dholmes-ora avatar Dec 15 '25 20:12 dholmes-ora

@dholmes-ora The hotspot label was successfully added.

openjdk[bot] avatar Dec 15 '25 20:12 openjdk[bot]

Webrevs

mlbridge[bot] avatar Dec 15 '25 20:12 mlbridge[bot]

Thanks for the review @shipilev !

dholmes-ora avatar Dec 16 '25 11:12 dholmes-ora

Important bit: Hotspot tests are running with fastdebug in GHA (job: hs/tier1 common), so the tests still run as PR check.

shipilev avatar Dec 16 '25 11:12 shipilev

Thanks for the review @lmesnik !

/integrate

dholmes-ora avatar Dec 17 '25 22:12 dholmes-ora

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

  • e75726ee03ca4664827ca5d680c02bcf2a96f4ea: 8373832: Test java/lang/invoke/TestVHInvokerCaching.java tests nothing
  • f3a48560b5e3a280f6f76031eb3d475ff9ee49f4: 8373807: test/jdk/java/net/httpclient/websocket/DummyWebSocketServer.java getURI() uses "localhost"
  • 4e05748f0899cabb235c71ecdf4256d4ad137a0d: 8373716: Refactor further java/util tests from TestNG to JUnit
  • ... and 51 more: https://git.openjdk.org/jdk/compare/0e7bc6b0928bd860c665ead26d2237055c0c9d27...master

Your commit was automatically rebased without conflicts.

openjdk[bot] avatar Dec 17 '25 22:12 openjdk[bot]

@dholmes-ora Pushed as commit b3fab41460eabf253879d140b55b6b12036c7c10.

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

openjdk[bot] avatar Dec 17 '25 22:12 openjdk[bot]