JDK-8292315 : Tests should not rely on specific JAR file names (hotspot)
  • Type: Sub-task
  • Component: hotspot
  • Sub-Component: runtime
  • Priority: P4
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2022-08-13
  • Updated: 2024-02-29
  • Resolved: 2022-08-18
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 20
17.0.10-oracleFixed 20 b12Fixed
Related Reports
Blocks :  
Relates :  
Relates :  
Description
There are tests that rely on specific JAR file names being present at run-time, which they don't control, as they are normally provided by jtreg's binary image. Examples for such JAR files names are:

- junit.jar
- hamcrest.jar
- testng.jar

These tests expect those specific JAR files being present in:

- jtreg's lib directory
- the value returned by System.getProperty("java.class.path")

Here is one such test in question:

https://github.com/openjdk/jdk/blob/master/test/hotspot/jtreg/runtime/cds/appcds/dynamicArchive/CDSStreamTestDriver.java

There may be more under "test/hotspot"
Comments
Fix request [17u] I backport this to enable jtreg 7 No risk, only a test change. I needed to add an import. Test passes. SAP nighlty testing passed
17-06-2023

A pull request was submitted for review. URL: https://git.openjdk.org/jdk17u-dev/pull/1461 Date: 2023-06-16 15:41:17 +0000
16-06-2023

Changeset: 62a7fc60 Author: Christian Stein <cstein@openjdk.org> Committer: Vicente Romero <vromero@openjdk.org> Date: 2022-08-18 17:26:14 +0000 URL: https://git.openjdk.org/jdk/commit/62a7fc60d3b3a27525fc01930834dab6f89bd451
18-08-2022

The change associated with this bug fix (JDK-8292315) is a CDS test so moving this bug to hotspot/runtime.
18-08-2022

A pull request was submitted for review. URL: https://git.openjdk.org/jdk/pull/9916 Date: 2022-08-18 11:34:51 +0000
18-08-2022

The idea is to do something similar as https://github.com/openjdk/jdk/commit/52dbfa99fe34d7b9469fba626e3577a22fd1d1fe
15-08-2022