RFR: 8253750: use build-stable default seed for Utils.RANDOM_GENERATOR [v2]

Igor Ignatyev iignatyev at openjdk.java.net
Mon Oct 5 16:46:55 UTC 2020


On Fri, 2 Oct 2020 23:10:13 GMT, Roger Riggs <rriggs at openjdk.org> wrote:

>> Igor Ignatyev has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   used Runtime.version() instead of ${java.vm.version}
>>   updated javadoc
>
> The code and description are reversed from what I suggested.
> 
> The seed should *only* be computed from the version information if it is a promoted or weekly build.
> All other builds should use a random seed.

Hi @RogerRiggs

I guess I have misinterpreted your sentence about system property being set (as `java.vm.version` is always set and the
only other property which mattered in this context is `jdk.test.lib.random.seed`). in any case, I agree that for
_personal_ builds, it's more desirable to have different seeds on each execution, especially given the fact that the
version string is set at configure-time and not at build-time, so one might end up with the same version string for a
very long time.

I have reworked the code a bit, so now version-based seed is used only for _promotable_ builds (i.e. ones that have
build number and it's greater than 0); local and remote/mach5 ad-hoc builds (by default) don't specify a build number,
so a random seed value will be used for them. and as before, if `jdk.test.lib.random.seed` is set, its value will be
used as seed oblivious to build type.

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

PR: https://git.openjdk.java.net/jdk/pull/391


More information about the core-libs-dev mailing list