Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-6492692

Some JCK test failed because of the complier warnings changes

    Details

    • Type: Bug
    • Status: Closed
    • Priority: P3
    • Resolution: Fixed
    • Affects Version/s: 7
    • Fix Version/s: 7
    • Component/s: security-libs
    • Labels:
    • Subcomponent:
    • Resolved In Build:
      b05
    • CPU:
      generic
    • OS:
      generic
    • Verification:
      Verified

      Description

      Cause known for the issue, will find a proper solution. And I will run a jck full test while back to office next Monday for more issues like this. I'm worried that the compiler warnings changes may cause some similar JCK issues, and if you encounter any other problems related to the warning changes, please let me know.

      Thanks,
      Andrew

      Brad Wetmore wrote:
      > Andrew,
      >
      > I believe one of your compiler warning changes has broken a JCK test case.
      >
      > One of the JCK tests does the following (reformatted slightly), which does not use generics:
      >
      > List certs = new Vector();
      > certs.add("The first certificate");
      > certs.add("The third certificate");
      > certs.add("The second certificate");
      > certs.add("The fourth certificate");
      > try {
      > cp = cf.generateCertPath( certs);
      > ref.println(
      > "CertificateException has not been thrown" +
      > "on attempt to generate Certificate Path from" +
      > "a List of strings");
      > return Status.failed(
      > "public final CertPath generateCertPath(" +
      > "List certificates) throws CertificateException " +
      > "Test Failed ");
      > } catch(CertificateException ce) {
      > ref.println("Expected exception "+ce);
      > }
      >
      > I believe this test worked before your change, but I haven't actually verified it.
      >
      > api/java_security/cert/CertificateFactory/
      >
      > Anyway, the test is now failing as seen below. The X509CertPath code (line 97) is expecting a <? extends Certificate>, but it's receiving a set of strings and is thus failing. The app is getting a ClassCastException runtime exception instead of a CertificateException checked exception, and thus failing on all platforms.
      >
      > Please look into it ASAP. Thanks.
      >
      > brad
      >
      >
      >
      > -------- Original Message --------
      >
      > This test is failing on all platforms that are running the jck:
      >
      > #Test Results (version 2)
      > #Thu Nov 09 20:24:26 PST 2006
      > #checksum:5317c27957e86351
      > #-----testdescription-----
      > $file=/u/martin/jck/JCK-runtime-6/tests/api/java_security/cert/CertificateFactory/index.html
      > $root=/u/martin/jck/JCK-runtime-6/tests
      > executeArgs=-TestURL $testURL
      > executeClass=javasoft.sqe.tests.api.java.security.cert.CertificateFactory.generateTests
      > id=generate
      > keywords=positive runtime
      > source=generateTests.java
      > title=CertificateFactory generate() methods tests
      >
      > #-----environment-----
      > command.testExecute=com.sun.jck.lib.ExecJCKTestOtherJVMCmd LD_LIBRARY_PATH=/u/martin/jck/lib-JCK-runtime-6 DISPLAY=:7 HOME=${user.home} HOME=/u/martin/jck/home /u/martin/ws/int/control/build/solaris-sparc/j2sdk-image/bin/java -Xmx256m ${jvmtiAgentOptions} -Xfuture $jdwpAgentOptions -classpath $testSuiteRootDir/classes $JPLISAgentOpts $JPLISAgent2Opts -Djava.security.policy=$testSuiteRootDir/lib/jck.policy $testExecuteClass $testExecuteArgs
      > user.home=/u/martin
      >
      > #-----testresult-----
      > description=file:///u/martin/jck/JCK-runtime-6/tests/api/java_security/cert/CertificateFactory/index.html#generate
      > end=Thu Nov 09 20:24:26 PST 2006
      > environment=autobuild_runtime
      > execStatus=Failed. test cases: 13; passed: 12; failed: 1; first test case failure: CertificateFactory2019
      > javatestOS=SunOS 5.9 (sparc)
      > javatestVersion=3.2.2
      > script=com.sun.jck.lib.JCKScript
      > sections=script_messages testExecute
      > start=Thu Nov 09 20:24:25 PST 2006
      > test=api/java_security/cert/CertificateFactory/index.html#generate
      > timeoutSeconds=600
      > work=/u/martin/jck/int/runtime-6/work/api/java_security/cert/CertificateFactory
      >
      > #section:script_messages
      > ----------messages:(1/24)----------
      > Executing test class...
      >
      > #section:testExecute
      > ----------messages:(1/530)----------
      > command: com.sun.jck.lib.ExecJCKTestOtherJVMCmd LD_LIBRARY_PATH=/u/martin/jck/lib-JCK-runtime-6 DISPLAY=:7 HOME=/u/martin HOME=/u/martin/jck/home /u/martin/ws/int/control/build/solaris-sparc/j2sdk-image/bin/java -Xmx256m -Xfuture -classpath /u/martin/jck/JCK-runtime-6/classes -Djava.security.policy=/u/martin/jck/JCK-runtime-6/lib/jck.policy javasoft.sqe.tests.api.java.security.cert.CertificateFactory.generateTests -TestURL file:///u/martin/jck/JCK-runtime-6/tests/api/java_security/cert/CertificateFactory/index.html#generate
      > ----------out1:(40/2863)----------
      > Provider SUN, algorithm CertificateFactory.X.509: Passed. OKAY
      > CertificateFactory2011: Passed. test cases: 1; all passed
      > Provider SUN, algorithm CertificateFactory.X.509: Passed. OKAY
      > CertificateFactory2012: Passed. test cases: 1; all passed
      > Provider SUN, algorithm CertificateFactory.X.509: Passed. OKAY
      > CertificateFactory2013: Passed. test cases: 1; all passed
      > Provider SUN, algorithm CertificateFactory.X.509: Passed. OKAY
      > CertificateFactory2014: Passed. test cases: 1; all passed
      > Provider SUN, algorithm CertificateFactory.X.509: Passed. OKAY
      > CertificateFactory2015: Passed. test cases: 1; all passed
      > Provider SUN, algorithm CertificateFactory.X.509: Passed. OKAY
      > CertificateFactory2016: Passed. test cases: 1; all passed
      > Provider SUN, algorithm CertificateFactory.X.509: Passed. OKAY
      > CertificateFactory2017: Passed. test cases: 1; all passed
      > Provider SUN, algorithm CertificateFactory.X.509: Passed. OKAY
      > CertificateFactory2018: Passed. test cases: 1; all passed
      > java.lang.ClassCastException: java.lang.String cannot be cast to java.security.cert.X509Certificate
      > at sun.security.provider.certpath.X509CertPath.<init>(X509CertPath.java:97)
      > at sun.security.provider.X509Factory.engineGenerateCertPath(X509Factory.java:375)
      > at java.security.cert.CertificateFactory.generateCertPath(CertificateFactory.java:387)
      > at javasoft.sqe.tests.api.java.security.cert.CertificateFactory.generateTests.CertificateFactory2019(generateTests.java:509)
      > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      > at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      > at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      > at java.lang.reflect.Method.invoke(Method.java:597)
      > at javasoft.sqe.javatest.lib.MultiTest.invokeTestCase(MultiTest.java:406)
      > at javasoft.sqe.jck.lib.ProviderTest.invokeTestCase(ProviderTest.java:281)
      > at javasoft.sqe.javatest.lib.MultiTest.run(MultiTest.java:195)
      > at javasoft.sqe.javatest.lib.MultiTest.run(MultiTest.java:127)
      > at javasoft.sqe.tests.api.java.security.cert.CertificateFactory.generateTests.main(generateTests.java:210)
      > CertificateFactory2019: Failed. Test case throws exception: java.lang.ClassCastException: java.lang.String cannot be cast to java.security.cert.X509Certificate
      > Provider SUN, algorithm CertificateFactory.X.509: Passed. OKAY
      > CertificateFactory2020: Passed. test cases: 1; all passed
      > Provider SUN, algorithm CertificateFactory.X.509: Passed. OKAY
      > CertificateFactory2021: Passed. test cases: 1; all passed
      > Provider SUN, algorithm CertificateFactory.X.509: Passed. OKAY
      > CertificateFactory2022: Passed. test cases: 1; all passed
      > Provider SUN, algorithm CertificateFactory.X.509: Passed. OKAY
      > CertificateFactory2023: Passed. test cases: 1; all passed
      > STATUS:Failed.test cases: 13; passed: 12; failed: 1; first test case failure: CertificateFactory2019
      > ----------out2:(21/1754)----------
      > === public final Certificate generateCertificate(InputStream inStream) throws CertificateException ===
      > === public final Certificate generateCertificate(InputStream inStream) throws CertificateException ===
      > === public final Certificate generateCertificate(InputStream inStream) throws CertificateException ===
      > Expected exception java.security.cert.CertificateException: Unable to initialize, java.io.IOException: extra data given to DerValue constructor
      > === public final Collection generateCertificates(InputStream inStream) throws CertificateException ===
      > === public final Collection generateCertificates(InputStream inStream) throws CertificateException ===
      > === public final Collection generateCertificates(InputStream inStream) throws CertificateException ===
      > === public final Collection generateCertificates(InputStream inStream) throws CertificateException ===
      > Expected exception java.security.cert.CertificateException: java.io.EOFException
      > === public final CertPath generateCertPath(List certificates) throws CertificateException ===
      > Number of Certificates is 1
      > === public final CertPath generateCertPath(List certificates) throws CertificateException ===
      > === public final CertPath generateCertPath(InputStream inStream) throws CertificateException ===
      > Number of Certificates is 1
      > === public final CertPath generateCertPath(InputStream inStream) throws CertificateException ===
      > === public final CertPath generateCertPath(InputStream inStream, String encoding) throws CertificateException ===
      > Will test for encoding PkiPath
      > Number of Certificates is 1
      > Will test for encoding PKCS7
      > Number of Certificates is 1
      > === public final CertPath generateCertPath(InputStream inStream, String encoding) throws CertificateException ===
      > result: Failed. test cases: 13; passed: 12; failed: 1; first test case failure: CertificateFactory2019
      >
      >
      > test result: Failed. test cases: 13; passed: 12; failed: 1; first test case failure: CertificateFactory2019
      >
      >
      >
      >
      > #Test Results (version 2)
      > #Thu Nov 09 20:24:26 PST 2006
      > #checksum:5317c27957e86351
      > #-----testdescription-----
      > $file=/u/martin/jck/JCK-runtime-6/tests/api/java_security/cert/CertificateFactory/index.html
      > $root=/u/martin/jck/JCK-runtime-6/tests
      > executeArgs=-TestURL $testURL
      > executeClass=javasoft.sqe.tests.api.java.security.cert.CertificateFactory.generateTests
      > id=generate
      > keywords=positive runtime
      > source=generateTests.java
      > title=CertificateFactory generate() methods tests
      >
      > #-----environment-----
      > command.testExecute=com.sun.jck.lib.ExecJCKTestOtherJVMCmd LD_LIBRARY_PATH=/u/martin/jck/lib-JCK-runtime-6 DISPLAY=:7 HOME=${user.home} HOME=/u/martin/jck/home /u/martin/ws/int/control/build/solaris-sparc/j2sdk-image/bin/java -Xmx256m ${jvmtiAgentOptions} -Xfuture $jdwpAgentOptions -classpath $testSuiteRootDir/classes $JPLISAgentOpts $JPLISAgent2Opts -Djava.security.policy=$testSuiteRootDir/lib/jck.policy $testExecuteClass $testExecuteArgs
      > user.home=/u/martin
      >
      > #-----testresult-----
      > description=file:///u/martin/jck/JCK-runtime-6/tests/api/java_security/cert/CertificateFactory/index.html#generate
      > end=Thu Nov 09 20:24:26 PST 2006
      > environment=autobuild_runtime
      > execStatus=Failed. test cases: 13; passed: 12; failed: 1; first test case failure: CertificateFactory2019
      > javatestOS=SunOS 5.9 (sparc)
      > javatestVersion=3.2.2
      > script=com.sun.jck.lib.JCKScript
      > sections=script_messages testExecute
      > start=Thu Nov 09 20:24:25 PST 2006
      > test=api/java_security/cert/CertificateFactory/index.html#generate
      > timeoutSeconds=600
      > work=/u/martin/jck/int/runtime-6/work/api/java_security/cert/CertificateFactory
      >
      > #section:script_messages
      > ----------messages:(1/24)----------
      > Executing test class...
      >
      > #section:testExecute
      > ----------messages:(1/530)----------
      > command: com.sun.jck.lib.ExecJCKTestOtherJVMCmd LD_LIBRARY_PATH=/u/martin/jck/lib-JCK-runtime-6 DISPLAY=:7 HOME=/u/martin HOME=/u/martin/jck/home /u/martin/ws/int/control/build/solaris-sparc/j2sdk-image/bin/java -Xmx256m -Xfuture -classpath /u/martin/jck/JCK-runtime-6/classes -Djava.security.policy=/u/martin/jck/JCK-runtime-6/lib/jck.policy javasoft.sqe.tests.api.java.security.cert.CertificateFactory.generateTests -TestURL file:///u/martin/jck/JCK-runtime-6/tests/api/java_security/cert/CertificateFactory/index.html#generate
      > ----------out1:(40/2863)----------
      > Provider SUN, algorithm CertificateFactory.X.509: Passed. OKAY
      > CertificateFactory2011: Passed. test cases: 1; all passed
      > Provider SUN, algorithm CertificateFactory.X.509: Passed. OKAY
      > CertificateFactory2012: Passed. test cases: 1; all passed
      > Provider SUN, algorithm CertificateFactory.X.509: Passed. OKAY
      > CertificateFactory2013: Passed. test cases: 1; all passed
      > Provider SUN, algorithm CertificateFactory.X.509: Passed. OKAY
      > CertificateFactory2014: Passed. test cases: 1; all passed
      > Provider SUN, algorithm CertificateFactory.X.509: Passed. OKAY
      > CertificateFactory2015: Passed. test cases: 1; all passed
      > Provider SUN, algorithm CertificateFactory.X.509: Passed. OKAY
      > CertificateFactory2016: Passed. test cases: 1; all passed
      > Provider SUN, algorithm CertificateFactory.X.509: Passed. OKAY
      > CertificateFactory2017: Passed. test cases: 1; all passed
      > Provider SUN, algorithm CertificateFactory.X.509: Passed. OKAY
      > CertificateFactory2018: Passed. test cases: 1; all passed
      > java.lang.ClassCastException: java.lang.String cannot be cast to java.security.cert.X509Certificate
      > at sun.security.provider.certpath.X509CertPath.<init>(X509CertPath.java:97)
      > at sun.security.provider.X509Factory.engineGenerateCertPath(X509Factory.java:375)
      > at java.security.cert.CertificateFactory.generateCertPath(CertificateFactory.java:387)
      > at javasoft.sqe.tests.api.java.security.cert.CertificateFactory.generateTests.CertificateFactory2019(generateTests.java:509)
      > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      > at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      > at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      > at java.lang.reflect.Method.invoke(Method.java:597)
      > at javasoft.sqe.javatest.lib.MultiTest.invokeTestCase(MultiTest.java:406)
      > at javasoft.sqe.jck.lib.ProviderTest.invokeTestCase(ProviderTest.java:281)
      > at javasoft.sqe.javatest.lib.MultiTest.run(MultiTest.java:195)
      > at javasoft.sqe.javatest.lib.MultiTest.run(MultiTest.java:127)
      > at javasoft.sqe.tests.api.java.security.cert.CertificateFactory.generateTests.main(generateTests.java:210)
      > CertificateFactory2019: Failed. Test case throws exception: java.lang.ClassCastException: java.lang.String cannot be cast to java.security.cert.X509Certificate
      > Provider SUN, algorithm CertificateFactory.X.509: Passed. OKAY
      > CertificateFactory2020: Passed. test cases: 1; all passed
      > Provider SUN, algorithm CertificateFactory.X.509: Passed. OKAY
      > CertificateFactory2021: Passed. test cases: 1; all passed
      > Provider SUN, algorithm CertificateFactory.X.509: Passed. OKAY
      > CertificateFactory2022: Passed. test cases: 1; all passed
      > Provider SUN, algorithm CertificateFactory.X.509: Passed. OKAY
      > CertificateFactory2023: Passed. test cases: 1; all passed
      > STATUS:Failed.test cases: 13; passed: 12; failed: 1; first test case failure: CertificateFactory2019
      > ----------out2:(21/1754)----------
      > === public final Certificate generateCertificate(InputStream inStream) throws CertificateException ===
      > === public final Certificate generateCertificate(InputStream inStream) throws CertificateException ===
      > === public final Certificate generateCertificate(InputStream inStream) throws CertificateException ===
      > Expected exception java.security.cert.CertificateException: Unable to initialize, java.io.IOException: extra data given to DerValue constructor
      > === public final Collection generateCertificates(InputStream inStream) throws CertificateException ===
      > === public final Collection generateCertificates(InputStream inStream) throws CertificateException ===
      > === public final Collection generateCertificates(InputStream inStream) throws CertificateException ===
      > === public final Collection generateCertificates(InputStream inStream) throws CertificateException ===
      > Expected exception java.security.cert.CertificateException: java.io.EOFException
      > === public final CertPath generateCertPath(List certificates) throws CertificateException ===
      > Number of Certificates is 1
      > === public final CertPath generateCertPath(List certificates) throws CertificateException ===
      > === public final CertPath generateCertPath(InputStream inStream) throws CertificateException ===
      > Number of Certificates is 1
      > === public final CertPath generateCertPath(InputStream inStream) throws CertificateException ===
      > === public final CertPath generateCertPath(InputStream inStream, String encoding) throws CertificateException ===
      > Will test for en

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                xuelei Xue-Lei Fan
                Reporter:
                xuelei Xue-Lei Fan
              • Votes:
                0 Vote for this issue
                Watchers:
                0 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Imported:
                  Indexed: