Integrated: 8310331: JitTester: Exclude java.lang.Math.random
Daohan Qu
dqu at openjdk.org
Mon Jul 3 09:03:02 UTC 2023
On Sun, 2 Jul 2023 09:16:55 GMT, Daohan Qu <dqu at openjdk.org> wrote:
> Test cases generated by JitTester might contain calls to `java.lang.Math.random()`. We could not set a seed for this random call. (In its implementation, `java.lang.Math` create `java.util.Random` instance statically (using the constructor `Random()`) and there is no way to set a seed for it.)
>
> Such tests might show up different variable values/printouts on each execution (Please refer to [the issue description](https://bugs.openjdk.org/browse/JDK-8310331)).
>
> Since it is meaningless to generate test cases with "unreproducible" results and JitTester has been able to assign random values to the generated variables (this seed could be set). Maybe we could just exclude the use of `java.lang.Math.random()` in JitTester's test case generation.
This pull request has now been integrated.
Changeset: 8e0ca8e0
Author: Daohan Qu <dqu at openjdk.org>
Committer: Tobias Hartmann <thartmann at openjdk.org>
URL: https://git.openjdk.org/jdk/commit/8e0ca8e05c0dcf201b2ede87620c6cde79e7d550
Stats: 1 line in 1 file changed: 1 ins; 0 del; 0 mod
8310331: JitTester: Exclude java.lang.Math.random
Reviewed-by: thartmann, chagedorn
-------------
PR: https://git.openjdk.org/jdk/pull/14748
More information about the hotspot-compiler-dev
mailing list