JDK-8286460 : Remove dependence on JAR filename in CDS tests
  • Type: Bug
  • Component: hotspot
  • Sub-Component: runtime
  • Affected Version: 19
  • Priority: P4
  • Status: Resolved
  • Resolution: Fixed
  • OS: generic
  • Submitted: 2022-05-10
  • Updated: 2022-09-26
  • Resolved: 2022-05-10
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 17 JDK 19
17.0.6-oracleFixed 19 b22Fixed
Related Reports
Relates :  
Relates :  
Description
Tests generated by CDSMHTest_generate.sh scripts include a hard-coded assumption on from where JUnit classes are loaded from. Namely: junit.jar This filename will change in JTREg 7 as described in https://bugs.openjdk.java.net/browse/CODETOOLS-7903047 and attached PRs.
In addition, the code seems to fail on splitting the class path correctly on Windows systems using Cygwin.

Possible fix for both issues: Use the location information stored in JUnit Test class' runtime representation.

String junitJar = Path.of(Test.class.getProtectionDomain().getCodeSource().getLocation().toURI()).toString();



Comments
A pull request was submitted for review. URL: https://git.openjdk.org/jdk17u-dev/pull/716 Date: 2022-09-21 13:09:25 +0000
21-09-2022

Fix request [17u] I backport this for parity with 17.0.6-oracle. No risk, only a test change. Clean backport. Tests don't compile, requires JDK-8286551. Tests pass if fixed.
21-09-2022

A pull request was submitted for review. URL: https://git.openjdk.org/jdk17u-dev/pull/713 Date: 2022-09-21 12:43:03 +0000
21-09-2022

Changeset: 52dbfa99 Author: Christian Stein <cstein@openjdk.org> Committer: Calvin Cheung <ccheung@openjdk.org> Date: 2022-05-10 18:13:41 +0000 URL: https://git.openjdk.java.net/jdk/commit/52dbfa99fe34d7b9469fba626e3577a22fd1d1fe
10-05-2022

Moving from hotspot/test to hotspot/runtime. Generally the tests for a product area live in the cat/subcat for that product area. hotspot/test tends to be used to test harness issues.
10-05-2022

A pull request was submitted for review. URL: https://git.openjdk.java.net/jdk/pull/8624 Date: 2022-05-10 07:27:35 +0000
10-05-2022