RFR(S/M) : 8242310 : use reproducible random in hotspot compiler tests
Vladimir Kozlov
vladimir.kozlov at oracle.com
Wed Apr 8 18:54:48 UTC 2020
Looks good.
Thanks,
Vladimir
On 4/7/20 6:04 PM, Igor Ignatyev wrote:
> http://cr.openjdk.java.net/~iignatyev//8242310/webrev.00
>> 282 lines changed: 123 ins; 24 del; 135 mod;
>
> Hi all,
>
> could you please review the patch which marks hotspot compiler tests w/ randomness k/w and uses Utils.getRandomInstance() instead of Random w/ _random_ seeds where possible? To identify tests which should be marked, I've used both static (in a form of analyzing classes which directly or indirectly depend on Random/SecureRandom/ThreadLocalRandom) and dynamic (by instrumenting the said classes to log tests which called their 'next' methods) analyses. I've decided *not* to mark tests which use SecureRandom only via File.createTemp* b/c in all such cases temp files are not used as a source of randomness, but rather just a reliable way to get a new/empty file/dir.
>
> the patch also
> - replaces fixed seed w/ 42 (in the tests which don't really depend on a seed value) as it's most common fixed seed in hotspot test suite;
> - moves Utils.getRandomInstance() calls closer to usage, so 'To re-run test with same seed value please add ... ' won't be printed out by the tests which don't actually use random but use share classes which might use random.
>
> webrevs: for the sake of reviewers, I've split the patch into parts, webrev.code.00 has only changes in the code, webrev.kw.00 -- only adds the k/w (and comments in few places where one might think k/w is needed), and webrev.00 contains all changes (including copyright year updates)
> http://cr.openjdk.java.net/~iignatyev//8242310/webrev.code.00
>> 109 lines changed: 41 ins; 24 del; 44 mod;
> http://cr.openjdk.java.net/~iignatyev//8242310/webrev.kw.00
>> 84 lines changed: 82 ins; 0 del; 2 mod;
> http://cr.openjdk.java.net/~iignatyev//8242310/webrev.00
>> 282 lines changed: 123 ins; 24 del; 135 mod;
>
> NB the patch depends on 8241707[1], which is currently under review[2].
>
> testing: test/hotspot/jtreg/compiler tests on {linux,windows,macosx}-x64
> JBS: https://bugs.openjdk.java.net/browse/JDK-8242310
>
> [1] https://bugs.openjdk.java.net/browse/JDK-8241707
> [2] https://mail.openjdk.java.net/pipermail/hotspot-dev/2020-April/041300.html
>
> Thanks,
> -- Igor
>
More information about the hotspot-compiler-dev
mailing list