Re: [9] RFR 8134487:updated sun/security/ssl/StatusStapling/* to work with modules

Alan Bateman Alan.Bateman at oracle.com
Tue Feb 16 11:25:53 UTC 2016


On 16/02/2016 11:05, Tim Du wrote:
> Hi Alan:
>
> I tried @compile/module to fix this issue before, but it does not work 
> ,Use  CertStatusReqExtensionTests.java  as example, the process as below:
> 1. Create java.base/sun/security/ssl folder in 
> test/sun/security/ssl/StatusStapling.
> 2. Move the dependency class like TestCase.java TestUtils.java 
> BogusStatusRequest.java into 
> test/sun/security/ssl/StatusStapling/java.base/sun/security/ssl
> 3. Move CertStatusReqExtensionTests.java  into 
> test/sun/security/ssl/StatusStapling/java.base/sun/security/ssl/ , as 
> it's in package sun.security.ssl and access non-public class.
> 4. Add @compile/module  in CertStatusReqExtensionTests.java as below:
> ###########################################
> @test
> @bug 8046321
> @compile/module=java.base sun/security/ssl/TestCase.java
> @compile/module=java.base sun/security/ssl/TestUtils.java
> @compile/module=java.base sun/security/ssl/BogusStatusRequest.java
> @compile/module=java.base 
> sun/security/ssl/CertStatusReqExtensionTests.java
> @run main/othervm CertStatusReqExtensionTests
> #############################################
>
> Bug got this error message:
> execStatus=Error. Parse Exceptioin\: Can't find source file\: 
> sun/security/ssl/TestCase.java
>
> Build and run CertStatusReqExtensionTest.java  by a wrapper could work 
> , and I saw some  existing tests were written in this way.So I think 
> this is a valid solution.Thanks.
Can you try this:

/*
  * @test
  * @modules java.base/sun.security.ssl
  * @build java.base/sun.security.ssl.CertStatusReqExtensionTests
  * @run main/othervm java.base/sun.security.ssl.CertStatusReqExtensionTests
  */

The @modules is so that jtreg can invoke 
un.security.ssl.CertStatusReqExtensionTests.

-Alan.









More information about the security-dev mailing list