RFR(S): 8155964 - Create a set of tests for verifying the Minimal VM

Leonid Mesnik leonid.mesnik at oracle.com
Tue Aug 23 10:23:46 UTC 2016


David


On 23.08.2016 03:57, David Holmes wrote:
> On 23/08/2016 9:08 AM, Chris Plummer wrote:
>> On 8/22/16 3:09 PM, David Holmes wrote:
>>> Hi Christian,
>>>
>>> Quick feedback ...
>>>
>>> On 23/08/2016 5:03 AM, Christian Tornqvist wrote:
>>>> Hi everyone,
>>>>
>>>> Please review this change that adds a set of tests for the Minimal
>>>> variant
>>>> of the JVM. The Minimal JVM is a subset that excludes some
>>>> functionality,
>>>> the tests here are intended to test verify that trying to use this
>>>> excluded
>>>> functionality doesn't lead to any unexpected errors/crashes.
>>>
>>> Note (for everyone) it was only a requirement that the primary options
>>> for managing unsupported features give a meaningful error message. For
>>> example UseG1GC should report it is not available, but selecting an
>>> option that only works for G1 will report whatever is reported when
>>> that option is called without G1 being selected (ie it wont report
>>> "this option only works with G1 and G1 is not available in the minimal
>>> VM"). And some failure modes may vary depending on which modules are
>>> available.
>>>
>>>> Verified by running the tests on Linux ARMv7 and Linux x86.
>>>>
>>>> Webrev:
>>>>
>>>> http://cr.openjdk.java.net/~ctornqvi/webrev/8155964/webrev.00/
>>>
>>> Initial comment only. I'm not sure that @requires vm.flavor ==
>>> "minimal" is the right way to do this. When you are going to launch a
>>> secondary VM with -minimal it suffices that the JRE/JDK under test has
>>> the minimal VM available, it isn't required that the main test VM run
>>> in the minimal VM. Granted jtreg can't tell you that (I don't think).
>>> There are features of the test library that use API's and VM
>>> capabilities that may not exist in the minimal VM (ie RuntimeMXBeans).
>> We need to make sure the tests are not run on platforms that don't
>> support the minimalVM, because they will fail. Using @requires vm.flavor
>> == "minimal" guarantees that the minimalVM is supported, and that you
>> will get it when the secondary VM is launched with -minimal.
>
> Understood. We should be okay as long as -minimal is not aliased (I 
> just discovered -client is aliased to -server on linux x86!). Was also 
> concerned about use of MXBeans to get runtime info - but maybe that 
> only affects execution on "compact profiles" not minimalVM per-se.
The @requires vm.flavor == "minimal" means that tests are executed only 
when jtreg runs with vmoption '-minimal'. It is good enough solution 
assuming that these tests are executed only with '-minimal' on supported 
platforms.
It is possible extend test/jtreg-ext/requires/VMProps.java with new 
property "isMinimalVMSupported"  which could be used to run negative 
minimal VM tests only for JDK where '-minimal' is supported.

Leonid

>
> Cheers,
> David
>
>
>> Chris
>>>
>>> More later ...
>>>
>>> Thanks,
>>> David
>>>
>>>>
>>>>
>>>> Bug (unfortunately not visible):
>>>>
>>>> https://bugs.openjdk.java.net/browse/JDK-8155964
>>>>
>>>>
>>>>
>>>> Thanks,
>>>>
>>>> Christian
>>>>
>>>>
>>>>
>>



More information about the hotspot-runtime-dev mailing list