RFR(S/M) : 8242312 : use reproducible random in hotspot gc tests

Igor Ignatyev igor.ignatyev at oracle.com
Tue Apr 14 20:29:49 UTC 2020


http://cr.openjdk.java.net/~iignatyev//8242312/webrev.00
> 278 lines changed: 98 ins; 19 del; 161 mod; 

Hi all,

could you please review the patch which updates hotspot gc tests in the same way as 8242310[1,2], 8242311[3,4] and 8242313[5,6] updated compiler, runtime and svc tests respectively:
> marks ... 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 adds a missed '*/' to gc/shenandoah/TestAllocObjectArrays.java, so the test gets split into 3 subtests as it was intended.

JBS: https://bugs.openjdk.java.net/browse/JDK-8242312
testing: test/hotspot/jtreg/gc on {linux,windows,macos}-x64 (w/ ShenandoahGC being built) and solaris-sparcv9

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 webrev.00 contains all changes (including copyright year updates) 
http://cr.openjdk.java.net/~iignatyev//8242312/webrev.code.00
> 182 lines changed: 82 ins; 16 del; 84 mod
http://cr.openjdk.java.net/~iignatyev//8242312/webrev.kw.00
> 69 lines changed: 16 ins; 3 del; 50 mod; 

http://cr.openjdk.java.net/~iignatyev//8242312/webrev.00
> 278 lines changed: 98 ins; 19 del; 161 mod; 


[1] https://bugs.openjdk.java.net/browse/JDK-8242310
[2] https://mail.openjdk.java.net/pipermail/hotspot-compiler-dev/2020-April/037828.html
[3] https://bugs.openjdk.java.net/browse/JDK-8242311
[4] https://mail.openjdk.java.net/pipermail/hotspot-runtime-dev/2020-April/038958.html
[5] https://bugs.openjdk.java.net/browse/JDK-8242313
[6] https://mail.openjdk.java.net/pipermail/serviceability-dev/2020-April/031016.html

Thanks,
-- Igor


More information about the hotspot-gc-dev mailing list