RFR: 8287873: Add test for using -XX:+AutoCreateSharedArchive with different JDK versions [v2]
Erik Joelsson
erikj at openjdk.org
Fri Jan 6 13:55:57 UTC 2023
On Thu, 5 Jan 2023 22:47:32 GMT, Matias Saavedra Silva <matsaave at openjdk.org> wrote:
>> This is an enhancement of the test case in [JDK-8296754](https://bugs.openjdk.org/browse/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.
>>
>> 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
>>
>> 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). Verified with tier1-4 tests.
>
> Matias Saavedra Silva has updated the pull request with a new target base due to a merge or a rebase. The incremental webrev excludes the unrelated changes brought in by the merge/rebase. The pull request contains eight additional commits since the last revision:
>
> - Fixed jib.sh
> - Removed prints
> - Ioi comments and jib.sh restored
> - Merge branch 'master' into sharedArchiveTest_8287873
> - Removing unused code
> - Removed file added by mistake
> - Defaults to old functionality on failure
> - 8287873: Add test for using -XX:+AutoCreateSharedArchive with different JDK versions
test/hotspot/jtreg/runtime/cds/appcds/dynamicArchive/TestAutoCreateSharedArchiveUpgrade.java line 62:
> 60: // "make test TEST=test/hotspot/jtreg/runtime/cds/appcds/dynamicArchive/TestAutoCreateSharedArchiveUpgrade.java",
> 61: // the test.boot.jdk property is normally passed by make/RunTests.gmk
> 62: private static String BOOT_JDK;
Could we please call this something else? The concept of the BOOT_JDK is a rather specific thing in the JDK build process. This test is using the build's BOOT_JDK as a default for "a JDK of some older version than the current". Calling that "BOOT_JDK" in this test is confusing at least to me.
Perhaps something like `OLD_JDK` would be more suitable?
test/hotspot/jtreg/runtime/cds/appcds/dynamicArchive/TestAutoCreateSharedArchiveUpgrade.java line 171:
> 169: // Fetch JDK artifact depending on platform
> 170: // If the artifact cannot be found, default to the test.boot.jdk property
> 171: private static String fetchBootJDK(int version) {
Same with the method names here, please don't call it BootJDK.
-------------
PR: https://git.openjdk.org/jdk/pull/11852
More information about the build-dev
mailing list