RFR: 8039489: Refactor test framework for dynamic VM options
Jon Masamitsu
jon.masamitsu at oracle.com
Mon May 19 16:24:58 UTC 2014
On 05/14/2014 07:28 AM, Dmitry Fazunenko wrote:
> Hi,
>
> Would you please look at the new version of a common library for
> testing dynamic VM options.
>
> Description:
> Some time ago a library for testing VM flags which could be changed
> dynamically was integrated into the hs repository:
> test/testlibrary/com/oracle/java/testlibrary/DynamicVMOptionChecker.java
> test/testlibrary/com/oracle/java/testlibrary/TestDynamicVMOption.java
>
> The library was designed in not the most optimal way.
> This change is an attempt to redesign it:
>
> test/testlibrary/com/oracle/java/testlibrary/DynamicVMOption.java
>
> is a new version which provides a convenient access to the HS API on
> changing VM flags.
> The tests based on the library are also refactored to meet new API.
>
> You comments will be much appreciated.
>
> http://cr.openjdk.java.net/~ehelin/dmitry/8039489/webrev.00/
> https://bugs.openjdk.java.net/browse/JDK-8039489
>
49 String badValues[] = {
50 null,
51 "",
52 "not a number",
53 "8.5",
54 Integer.toString(Integer.MIN_VALUE),
55 Integer.toString(Integer.MAX_VALUE),
56 Integer.toString(minValue - 1),
57 "-1024", "-10", "-1", "101", "190", "1997"
58 };
I can see how having one negative integer among the bad
values and one positive integer above 100 among the bad
values is worth it but what does having 2 more negative values
and 2 more positive value over 100 add to the test?
How about "-8.5"?
http://cr.openjdk.java.net/~ehelin/dmitry/8039489/webrev.00/test/gc/parallelScavenge/TestDynShrinkHeap.java.frames.html
83 int min = DynamicVMOption.getInt(MIN_FREE_RATIO_FLAG_NAME);
84 DynamicVMOption.setInt(MAX_FREE_RATIO_FLAG_NAME, min + 1);
Would it be better to set MaxHeapFreeRatio to "min" instead of "min + 1"
since some future execution of the test could set the min value to
100?
Rest looks good.
Jon
> I want to thank Erik Helin for his incredible assistance with working
> on this change.
>
> Thanks,
> Dima
More information about the hotspot-dev
mailing list