On Wed, 4 Jan 2023 20:07:48 GMT, Matias Saavedra Silva <matsa...@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 connect to an artifactory that hosts valid JDK releases:
>      - Download and install previous JDK versions (19 through N) from the 
> artifactory
>         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 connect to such an artifactory, revert to the existing 
> logic in TestAutoCreateSharedArchiveUpgrade.java (use the test.boot.jdk or 
> test.previous.jdk properties). Verified with tier1-4 tests.

test/hotspot/jtreg/runtime/cds/appcds/dynamicArchive/TestAutoCreateSharedArchiveUpgrade.java
 line 85:

> 83:             setupJVMs(os);
> 84:             doTest();
> 85:         }

If fetchBootJDK() cannot connect to the artifactory, it will always returns the 
same path regardless of the version. In that case, we shouldn't call doTest() 
more than once.

test/lib/jdk/test/lib/artifacts/Artifact.java line 44:

> 42:     int version() default 0;
> 43:     int build_number() default 0;
> 44:     String file() default "";

Are the changes in this file still needed? I think you were using Artifact and 
annotations in an earlier version of TestAutoCreateSharedArchiveUpgrade.java, 
but that would result in lots of duplications across {JDK versions} x { 
platforms}. That's why you chose to go with a lower-level API (the new 
ArtifactResolver.::resolve() method) so you can build the Map programmatically.

-------------

PR: https://git.openjdk.org/jdk/pull/11852

Reply via email to