JDK-8287873 : Add test for using -XX:+AutoCreateSharedArchive with different JDK versions
  • Type: Enhancement
  • Component: hotspot
  • Sub-Component: runtime
  • Affected Version: 19
  • Priority: P4
  • Status: In Progress
  • Resolution: Unresolved
  • Submitted: 2022-06-06
  • Updated: 2023-01-06
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 21
21Unresolved
Related Reports
Relates :  
Relates :  
Description
This is an enhancement of  the test case in JDK-8296754, which tests against an archive created by the "boot JDK", which is usually set as the previous official JDK release when building the JDK repo. See:

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

To be more comprehensive, we should enhance  so that 

[1] If it's able to acquire previous valid JDK releases:
- Download and install previous JDK versions (19 through N)
where N == java.lang.Runtime.version​().major() - 1
- Test the interaction of the current JDK versus each of the previous releases

[2] If it's not able to find the previous releases revert to the existing logic in TestAutoCreateSharedArchiveUpgrade.java (use the test.boot.jdk or test.previous.jdk properties).

************************
We need to add some extra properties to be passed to test/lib/jdk/test/lib/artifacts/JibArtifactManager.java (more details will be added here ....)

Comments
A pull request was submitted for review. URL: https://git.openjdk.org/jdk/pull/11852 Date: 2023-01-04 20:07:48 +0000
05-01-2023

According to [~erikj] To get this to work, https://github.com/openjdk/jdk/blob/master/test/lib/jdk/test/lib/artifacts/ArtifactResolver.java needs to supply properties like this in the map it sends to the ArtifactManager: server: "jpg", product: "jdk", version: common.boot_jdk_version, build_number: common.boot_jdk_build_number, file: "bundles/" + boot_jdk_platform + "/jdk-" + common.boot_jdk_version + "_" + boot_jdk_platform + "_bin" + boot_jdk_ext, (The above are from https://github.com/openjdk/jdk/blob/7af6b4b54cc2ead4f5dbd6bfa7fd343b84c1d8b5/make/conf/jib-profiles.js#L1070-L1079 , where it specifies the boot jdk) Resolving those values for linux-x64 would look something like this: server: "jpg", product: "jdk", version: "19", build_number: "36", file: "bundles/linux-x64/jdk-19_linux-x64_bin.tar.gz" This means we should add a few extra fields to https://github.com/openjdk/jdk/blob/master/test/lib/jdk/test/lib/artifacts/Artifact.java: - server - product - version - build_number - file (For an example of using ArtifactResolver, see https://github.com/openjdk/jdk/blob/master/test/lib/jdk/test/lib/security/OpensslArtifactFetcher.java )
29-11-2022