JDK-8292633 : runtime/cds/appcds/dynamicArchive/CDSStreamTestDriver.java fails to compile
  • Type: Bug
  • Component: hotspot
  • Sub-Component: runtime
  • Affected Version: 20
  • Priority: P2
  • Status: Closed
  • Resolution: Fixed
  • OS: generic
  • CPU: generic
  • Submitted: 2022-08-18
  • Updated: 2022-12-14
  • 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 20
20 b12Fixed
Related Reports
Relates :  
Description
The following test fails to compile in the JDK20 CI:

runtime/cds/appcds/dynamicArchive/CDSStreamTestDriver.java

----------direct:(8/616)----------
/opt/mach5/mesos/work_dir/jib-master/install/jdk-20+12-671/src.full/open/test/hotspot/jtreg/runtime/cds/appcds/dynamicArchive/CDSStreamTestDriver.java:59: error: cannot find symbol
        String testngJar = Path.of(Test.class.getProtectionDomain().getCodeSource().getLocation().toURI()).toString();
                           ^
  symbol:   variable Path
  location: class CDSStreamTestDriver
Note: /opt/mach5/mesos/work_dir/jib-master/install/jdk-20+12-671/src.full/open/test/lib/jdk/test/lib/process/ProcessTools.java uses unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
1 error
result: Failed. Compilation failed: Compilation failed
Comments
The fix for this bug is integrated in jdk-20+12-672.
19-08-2022

Changeset: 82dbe29f Author: Christian Stein <cstein@openjdk.org> Committer: Daniel D. Daugherty <dcubed@openjdk.org> Date: 2022-08-18 23:29:39 +0000 URL: https://git.openjdk.org/jdk/commit/82dbe29fc8327f6992703f54181c3e42beb99ccf
18-08-2022

A pull request was submitted for review. URL: https://git.openjdk.org/jdk/pull/9928 Date: 2022-08-18 20:24:14 +0000
18-08-2022

This is the likely fix: $ git diff diff --git a/test/hotspot/jtreg/runtime/cds/appcds/dynamicArchive/CDSStreamTestDriver.java b/test/hotspot/jtreg/runtime/cds/appcds/dynamicArchive/CDSStreamTestDriver.java index b7e022a5ba8..88af964d836 100644 --- a/test/hotspot/jtreg/runtime/cds/appcds/dynamicArchive/CDSStreamTestDriver.java +++ b/test/hotspot/jtreg/runtime/cds/appcds/dynamicArchive/CDSStreamTestDriver.java @@ -37,6 +37,7 @@ import org.testng.annotations.Test; import java.io.File; +import java.nio.file.Path; import jtreg.SkippedException; import jdk.test.whitebox.gc.GC; Testing on my MBP13 now. Update: Test fails to compile without the above change. Test compiles and passes with it.
18-08-2022

[~cstein] - Please take a look at this failure. It appears to be caused by: JDK-8292315 Tests should not rely on specific JAR file names (hotspot)
18-08-2022