Newly added test sun/security/ssl/X509TrustManagerImpl/distrust/Chunghwa.java got compilation failure with jdk8
- Dominant language
- HTML
- Stars
- 155
- Forks
- 346
- Avg merge
- 2d 9h
- Merged PRs (30d)
- 36
Description
Newly added test sun/security/ssl/X509TrustManagerImpl/distrust/Chunghwa.java got compile failure with jdk8 https://github.com/openjdk/jdk8u/commit/4e991575f4e76a69b4108378b60b25c1f0a96842#diff-64ab16c5cee240401b87157ac65a6b9c9767c574116700a98ef309db85e0660e. https://bugs.openjdk.org/browse/JDK-8369282, enhancement backports to jdk8. Only failed in jdk8.
```
13:08:06 direct:
13:08:06 /Users/admin/workspace/workspace/Test_openjdk8_hs_extended.openjdk_x86-64_mac_rerun/aqa-tests/openjdk/openjdk-jdk/jdk/test/sun/security/ssl/X509TrustManagerImpl/distrust/Distrust.java:101: error: cannot find symbol
13:08:06 new PKIXBuilderParameters(SecurityUtils.getCacertsKeyStore(),
13:08:06 ^
13:08:06 symbol: variable SecurityUtils
13:08:06 location: class Distrust
13:08:06 Note: /Users/admin/workspace/workspace/Test_openjdk8_hs_extended.openjdk_x86-64_mac_rerun/aqa-tests/openjdk/openjdk-jdk/jdk/test/sun/security/ssl/X509TrustManagerImpl/distrust/Distrust.java uses or overrides a deprecated API.
13:08:06 Note: Recompile with -Xlint:deprecation for details.
13:08:06 Note: /Users/admin/workspace/workspace/Test_openjdk8_hs_extended.openjdk_x86-64_mac_rerun/aqa-tests/openjdk/openjdk-jdk/jdk/test/sun/security/ssl/X509TrustManagerImpl/distrust/Distrust.java uses unchecked or unsafe operations.
13:08:06 Note: Recompile with -Xlint:unchecked for details.
13:08:06 1 error
13:08:06
13:08:06 TEST RESULT: Failed. Compilation failed: Compilation failed
```
Seem this should be reported to upstream as it's compilation failure. Should the library change from /test/lib to - /lib/security ?
```
/*
* @test
* @bug 8369282
* @summary Check that TLS Server certificates chaining back to distrusted
* Chunghwa root are invalid
* @library /test/lib---->/lib/security ???
* @modules java.base/sun.security.validator
* @run main/othervm Chunghwa after policyOn invalid
* @run main/othervm Chunghwa after policyOff valid
* @run main/othervm Chunghwa before policyOn valid
* @run main/othervm Chunghwa before policyOff valid
*/
```
Contributor guide
Research direction
Start with sun/security/ssl/X509TrustManagerImpl/distrust/Chunghwa.java and Distrust.java, then inspect the referenced jdk8u test-library paths for SecurityUtils. Reproduce the JDK 8 compilation failure and compare the test's @library declaration with the available library location. Done means the distrust test compiles successfully on JDK 8.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- testing-qa
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 64/100