[jdk17] RFR: 8267271: Fix gc/arguments/TestNewRatioFlag.java expectedNewSize calculation

Stefan Johansson sjohanss at openjdk.java.net
Mon Jun 14 07:38:31 UTC 2021

Please review this test-fix to avoid failures on certain platforms.

Fixes an incorrect calculation in the test when trying to predict the new size given the `NewRatio`. The fix is not strictly bound to different platforms but to the resulting heap-size the test is run with. Both with Serial and Parallel the test fails if run on a platform using a heap alignment that forces the heap to be 104 MB instead of the specified 100 MB. It is a bit unclear why the test even passes with 100MB, since the calculation done in the test doesn't match the calculation done in the JVM. 

Manual testing to verify the fix actually fixes the issue and works with multiple page sizes. Mach5 testing on affected platforms to verify the fix is good there as well.


Commit messages:
 - Fix gc/arguments/TestNewRatioFlag.java expectedNewSize calculation

Changes: https://git.openjdk.java.net/jdk17/pull/28/files
 Webrev: https://webrevs.openjdk.java.net/?repo=jdk17&pr=28&range=00
  Issue: https://bugs.openjdk.java.net/browse/JDK-8267271
  Stats: 6 lines in 1 file changed: 2 ins; 0 del; 4 mod
  Patch: https://git.openjdk.java.net/jdk17/pull/28.diff
  Fetch: git fetch https://git.openjdk.java.net/jdk17 pull/28/head:pull/28

PR: https://git.openjdk.java.net/jdk17/pull/28

More information about the hotspot-gc-dev mailing list