RFR: 8318525: Atomic gtest should run as TEST_VM to access VM capabilities
Stefan Karlsson
stefank at openjdk.org
Fri Oct 20 08:22:35 UTC 2023
On Thu, 19 Oct 2023 14:51:05 GMT, Aleksey Shipilev <shade at openjdk.org> wrote:
> While doing JDK-8316961, I noticed that atomic tests behave weirdly when executed from gtest. I believe the reason is that tests are running as TEST, not as TEST_VM. So the VM is not initialized, which fails the tests on asserts and/or takes weird paths in the atomic code.
>
> Some Atomic implementations reach to VM_Version for asserts:
> https://github.com/openjdk/jdk/blob/9cf334fb6488188ea4236e5d156b11245bace88f/src/hotspot/os_cpu/linux_arm/atomic_linux_arm.hpp#L149
>
> Some Atomic implementations reach to StubRoutines for fallbacks:
> https://github.com/openjdk/jdk/blob/9cf334fb6488188ea4236e5d156b11245bace88f/src/hotspot/os_cpu/linux_arm/os_linux_arm.cpp#L520
>
> Additional testing:
> - [x] linux-aarch64-server-fastdebug, affected test passes
> - [x] linux-arm-server-fastdebug, affected test passes
Yeah. I think so.
-------------
PR Comment: https://git.openjdk.org/jdk/pull/16269#issuecomment-1772290710
More information about the hotspot-runtime-dev
mailing list