> On Jun 8, 2016, at 10:30 AM, Dmitry Dmitriev <dmitry.dmitr...@oracle.com> 
> wrote:
> 
> Hello Mandy,
> 
> As I understand all these options are tested by following tests: 
> jdk/test/tools/launcher/modules. I.e. no additional tests are required for 
> moving these options to the VM(except 2 new tests)?
> 

Correct.  The options and syntax remain the same as it’s specified in JEP 261.  
The existing tests cover these options. 

> You only adds 2 additional tests:
> RuntimeArguments.java - to check that these options are VM options
> IgnoreModulePropertiesTest.java - to check that java throws an exception for 
> invalid values and that corresponding properties are ignored.
> 
> I have a question about one part of the IgnoreModulePropertiesTest.java test:
>  38     // Test that the specified property and its value are ignored.  If 
> the VM accepted
>  39     // the property and value then an exception would be thrown because 
> the value is
>  40     // bogus for that property.  But, since the property is ignored no 
> exception is
>  41     // thrown.
>  42     public static void testProperty(String prop, String value) throws 
> Exception {
>  43         ProcessBuilder pb = ProcessTools.createJavaProcessBuilder(
>  44             "-D" + prop + "=" + value, "-version");
>  45         OutputAnalyzer output = new OutputAnalyzer(pb.start());
>  46         output.shouldContain("java version ");
>  47         output.shouldHaveExitValue(0);
>  48
>  49         // Ensure that the property and its value aren't available.
>  50         if (System.getProperty(prop) != null) {
>  51             throw new RuntimeException(
>  52                 "Unexpected non-null value for property " + prop);
>  53         }
>  54     }
> 
> Lines 49-53 verifies that property not exist, but this property is obtained 
> from the main test and not from the launched vm(launched with "-D" + prop + 
> "=" + value). Is it intended?
> 

This is to check the property set in the main test and not the properties and 
options passed to testWhiteSpaceOption and testOption metohds since the 
argument is invalid.  

The main test itself only sets -XaddExports.  It could have @run to specify 
-addmods and -limitmods with a valid argument to cover a couple of other 
properties. The main thing for this test to validate is that -D is dropped.

Mandy

Reply via email to