RFR: 8371343: ZGC: Remove dependency on test execution order for gtests

Axel Boldt-Christmas aboldtch at openjdk.org
Mon Nov 10 05:56:12 UTC 2025


On Wed, 5 Nov 2025 18:58:56 GMT, Axel Boldt-Christmas <aboldtch at openjdk.org> wrote:

> We currently have a few gtests which are run with the TEST_F macro and use `ZGlobalsPointers::initialize();` which on some platforms may end up doing GC precious logging, which requires the VM (mutexes) to be setup in order to work. Currently the `GTestWrapper.java` succeeds with running these test because we will have run other tests which have setup the VM.
> 
> If a filter is used or the tests are shuffled we can observe that these tests may crash.
> 
> Proposed change is to use the `ZTest` unittest base fixture and run these test with `TEST_VM_F`
> 
> Testing
>  * GHA
>  * gtests with and without filter and shuffled test order

Thanks for the reviews

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

PR Comment: https://git.openjdk.org/jdk/pull/28160#issuecomment-3509535874


More information about the hotspot-gc-dev mailing list