Integrated: 8299699: Test runtime/cds/appcds/WrongClasspath.java fails after JDK-8299329
Ashutosh Mehra
duke at openjdk.org
Fri Jan 6 19:58:58 UTC 2023
On Fri, 6 Jan 2023 14:25:05 GMT, Ashutosh Mehra <duke at openjdk.org> wrote:
> Failure happens because `TestCommon#patchJarForDynamicDump(String cp)` expects the jar files passed in `cp` parameter are with absolute path. The new test case added for JDK 8299329 passed jar files using path relative to work dir.
>
>
> if (!firstJar.startsWith(expected)) {
> throw new RuntimeException("FIXME: jar file not at a supported location ('"
> + expected + "'): " + firstJar);
> }
>
>
> This fix converts `firstJar` into real path using `Path.toRealPath()` before doing `firstJar.startsWith(expected)`.
> This way all relative paths are also converted to absolute paths before the check is performed.
>
> I tested this fix by running WrongClasspath test with `-Dtest.dynamic.cds.archive=true` as:
>
> $ java -jar /work/jtreg/build/images/jtreg/lib/jtreg.jar -Dtest.dynamic.cds.archive=true -jdk:/work/jdk/build/JDK-8299329-fd/images/jdk test/hotspot/jtreg/runtime/cds/appcds/WrongClasspath.java
>
> Signed-off-by: Ashutosh Mehra <asmehra at redhat.com>
This pull request has now been integrated.
Changeset: d6d6eb4c
Author: Ashutosh Mehra <asmehra at redhat.com>
Committer: Calvin Cheung <ccheung at openjdk.org>
URL: https://git.openjdk.org/jdk/commit/d6d6eb4cba3d2d85035b46d18e8817b5b2a354a2
Stats: 3 lines in 1 file changed: 3 ins; 0 del; 0 mod
8299699: Test runtime/cds/appcds/WrongClasspath.java fails after JDK-8299329
Reviewed-by: iklam, ccheung
-------------
PR: https://git.openjdk.org/jdk/pull/11882
More information about the hotspot-runtime-dev
mailing list