RFR: 8254042: gtest/GTestWrapper.java failed os.test_random
Coleen Phillimore
coleenp at openjdk.java.net
Tue Nov 24 23:45:01 UTC 2020
On Tue, 24 Nov 2020 23:38:52 GMT, Coleen Phillimore <coleenp at openjdk.org> wrote:
> The function os::init_random() and os::random() both set the _rand_seed. This test thinks nothing can change the seed while it is computing its expected value.
> I changed the test to run in a VM operation safepoint. Alternately, I can change the test to not verify the random value computed in the loop, or remove the test.
> Ran tier1 tests on linux-x64 and windows-x64.
I also changed the platform code to not initialize the random seed, instead it is statically initialized. The only function that needs to call os::init_random() is the CDS archiver. So I added an assert that this can only be called inside a safepoint.
-------------
PR: https://git.openjdk.java.net/jdk/pull/1422
More information about the hotspot-dev
mailing list