RFR(M): 8185436: jtreg: introduce keyword to disable cds tests

Mikhailo Seledtsov mikhailo.seledtsov at oracle.com
Fri Jul 28 21:53:17 UTC 2017

Hi Goetz,

   I am a HotSpot SQE Engineer at Oracle. I have discussed your proposed 
fix with Igor Ignatyev (also VM SQE Engineer), and we have the following 
feedback on this change.

1. As part of streamlining and simplifying SQE process and the use of 
test tools we have narrowed down the test selection mechanisms.

2. Our preferred test selection mechanism is use of "@requires" and a 
corresponding test/jtreg-ext/requires/VMProps.java. Even though JTREG 
supports use of "@key",  we prefer the use of "@requires" as a first choice.

3. If it is not possible to use "@requires" for a given situation then 
use "@key" mechanism. We would ask you if you could explore the 
possibility of implementing this change via @requires first.

Here are several hints that may help:

1. Take a look at <top>/test/jtreg-ext/requires/VMProps.java. The value 
of a given "requires property" is evaluated inside this file and placed 
into a map (see public call() method). Add your evaluation code here, 
and then follow the pattern used for other properties. Create a property 
(e.g. vm.cds.supported, with values of true/false). Create a method that 
evaluates the property value (e.g. isCDSSupported() or similar).

2. The method could use several options to evaluate whether CDS is 
     A. WhiteBox API. Create a new WB test API method which can return 
true if CDS_ compiler flag is defined, otherwise false.
         Call WB API from VMProps.java. See 
WB.getBooleanVMFlag("EnableJVMCI") as an example. Or create your own 
         WhiteBox.java resides in test/lib/sun/hotspot/WhiteBox.java

     B. Another options is to evaluate by running VM with sharing on and 
checking the return (may be not as reliable as option A)
     C. Other ideas welcome.

3. Include "@requres vm.cds.supported == true" to the appropriate tests.

Let me know if you have any questions.

Best regards,

On 7/28/17, 12:58 AM, Lindenmaier, Goetz wrote:
> Hi
> we compile the VM without CDS support. Thus the CDS tests
> fail. This change introduces a keyword 'cds' and marks
> the tests accordingly.
> This change also fixes the keywords specified in gc/g1/TestSharedArchiveWithPreTouch.java.
> There may only be one @key keyword in the test specification.
> In runtime/CompressedOops/CompressedClassPointers.java only one test
> case required CDS. I changed this sub case to succeed if CDS is not
> available.
> Please review this change. I please need a sponsor.
> http://cr.openjdk.java.net/~goetz/wr17/8185436-cdsKey/webrev.01/
> Best regards,
>    Goetz.

More information about the hotspot-runtime-dev mailing list