Running gtests with -Xshare:on gives us a VM exit with
"Unable to use shared archive"
See:
```
thomas@starfish$ ./hotspot/variant-server/libjvm/gtest/gtestLauncher -jdk:./images/jdk -Xshare:on -Xlog:cds*=debug
Note: Google Test filter = Compressed*
[==========] Running 8 tests from 1 test suite.
[----------] Global test environment set-up.
[----------] 8 tests from CompressedKlass
[ RUN ] CompressedKlass.basics_vm
[0.021s][info][cds] trying to map /shared/projects/openjdk/jdk-jdk/output-fastdebug/images/jdk/lib/hotspot/classes.jsa
[0.021s][info][cds] Specified shared archive not found (/shared/projects/openjdk/jdk-jdk/output-fastdebug/images/jdk/lib/hotspot/classes.jsa)
[0.021s][info][cds] Initialize static archive failed.
[0.021s][info][cds] Unable to map shared spaces
[0.021s][error][cds] An error has occurred while processing the shared archive file.
[0.021s][error][cds] Unable to map shared spaces
Error occurred during initialization of VM
Unable to use shared archive.
```
It would be quite useful to be able to use gtests with CDS on since VM setup is different with CDS, so different paths can get exercised.
At first glance, this seems easily fixable; we just don't seem to be able to find the jsa files, but they already exist, just not under "lib/hotspot"
"Unable to use shared archive"
See:
```
thomas@starfish$ ./hotspot/variant-server/libjvm/gtest/gtestLauncher -jdk:./images/jdk -Xshare:on -Xlog:cds*=debug
Note: Google Test filter = Compressed*
[==========] Running 8 tests from 1 test suite.
[----------] Global test environment set-up.
[----------] 8 tests from CompressedKlass
[ RUN ] CompressedKlass.basics_vm
[0.021s][info][cds] trying to map /shared/projects/openjdk/jdk-jdk/output-fastdebug/images/jdk/lib/hotspot/classes.jsa
[0.021s][info][cds] Specified shared archive not found (/shared/projects/openjdk/jdk-jdk/output-fastdebug/images/jdk/lib/hotspot/classes.jsa)
[0.021s][info][cds] Initialize static archive failed.
[0.021s][info][cds] Unable to map shared spaces
[0.021s][error][cds] An error has occurred while processing the shared archive file.
[0.021s][error][cds] Unable to map shared spaces
Error occurred during initialization of VM
Unable to use shared archive.
```
It would be quite useful to be able to use gtests with CDS on since VM setup is different with CDS, so different paths can get exercised.
At first glance, this seems easily fixable; we just don't seem to be able to find the jsa files, but they already exist, just not under "lib/hotspot"
- links to
-
Commit(master) openjdk/jdk/e98df71d
-
Review(master) openjdk/jdk/23758