RFR: 8348028: Unable to run gtests with CDS enabled
Calvin Cheung
ccheung at openjdk.org
Wed Feb 26 17:55:57 UTC 2025
On Wed, 26 Feb 2025 02:39:08 GMT, Ioi Lam <iklam at openjdk.org> wrote:
> An alternative suggestion:
>
> Instead of finding the default archive in the same directory as `os::jvm_path()`, which is wrong when using gtestLauncher
>
> https://github.com/openjdk/jdk/blob/037e47112bdf2fa2324f7c58198f6d433f17d9fd/src/hotspot/share/cds/cdsConfig.cpp#L90-L97
>
> We should find it from `Arguments::get_java_home()`:
>
> ```
> stringStream tmp;
> const char* subdir = WINDOWS_ONLY("bin") NOT_WINDOWS("lib");
> tmp.print("%s%s%s%s%sclasses", Arguments::get_java_home(), os::file_separator(), subdir,
> JVM_VARIANT, os::file_separator());
> ```
>
I like this approach better since the change is contained within CDS code. We probably need to file another but to address the issue in `os::jvm_path()`. I found the following email thread detailing some issues in `os::jvm_path()`
https://mail.openjdk.org/pipermail/hotspot-runtime-dev/2017-April/023226.html
-------------
PR Comment: https://git.openjdk.org/jdk/pull/23758#issuecomment-2685790209
More information about the hotspot-runtime-dev
mailing list