Re: [9] RFR 8134487:updated sun/security/ssl/StatusStapling/* to work with modules
Tim Du
tiantian.du at oracle.com
Wed Feb 17 08:19:42 UTC 2016
Hi Alan:
On 2/16/2016 7:25 PM, Alan Bateman wrote:
> 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.
>
Follow you suggestion, I updated the code as below:
1.Create java.base/sun/security/ssl under
test/sun/security/ssl/StatusStapling/, move all test files and
dependency class into java.base/sun/security/ssl ,removed the jtreg
label from test java files.
2.Create java.base/sun/security/testlibrary , add CertficateBuilder.java
and SimpleOCSPServer.java into this folder, so that
StatusResponseManagerTests.java could access them by java.base .
3.Add TestRun.java to load all test.
The new webrev is http://cr.openjdk.java.net/~tidu/8134487/webrev.02/ ,
please help to have a look,Thank you.
Regards
Tim
> -Alan.
>
>
>
>
>
>
>
More information about the security-dev
mailing list