RFR: 8356102: TestJcmdOutput, JcmdWithNMTDisabled and DumpSharedDictionary hs/tier1 tests fail on static-jdk [v3]

Jiangli Zhou jiangli at openjdk.org
Wed May 14 01:49:43 UTC 2025


> Please review the change to set `-Dcompile.jdk=<jdk>` when launching child processes in TestJcmdOutput, JcmdWithNMTDisabled and DumpSharedDictionary hs/tier1 tests.
> 
> These three tests fail on static-jdk as `jdk.test.lib.JDKToolFinder.getJDKTool()` fails to locate the `jcmd` tool. `JDKToolFinder.getJDKTool()` locates the requested tool from the path specified in 'test.jdk' system property first, then using the path specified in 'compile.jdk' system property. Currently when running jtreg tests on static-jdk, jtreg '-compilejdk' is set to a regular JDK binary. Populating the 'compile.jdk' system property from jtreg when creating the child process would allow `JDKToolFinder.getJDKTool()` (executing in the child process) to locate the tool from 'compile.jdk' path.
> 
> Tested all three tests on static-jdk. All three tests pass with the fix.

Jiangli Zhou has updated the pull request incrementally with two additional commits since the last revision:

 - Revert to https://github.com/openjdk/jdk/pull/25018/commits/6fd8d7ef2de6f0b4f6bed50e4255e1091834b68b.
 - Revert test/lib/jdk/test/lib/process/ProcessTools.java.

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

Changes:
  - all: https://git.openjdk.org/jdk/pull/25018/files
  - new: https://git.openjdk.org/jdk/pull/25018/files/dd23d795..6b1b6871

Webrevs:
 - full: https://webrevs.openjdk.org/?repo=jdk&pr=25018&range=02
 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=25018&range=01-02

  Stats: 13 lines in 4 files changed: 6 ins; 4 del; 3 mod
  Patch: https://git.openjdk.org/jdk/pull/25018.diff
  Fetch: git fetch https://git.openjdk.org/jdk.git pull/25018/head:pull/25018

PR: https://git.openjdk.org/jdk/pull/25018


More information about the hotspot-runtime-dev mailing list