JDK-8262862 : Harden tests sun/security/x509/URICertStore/ExtensionsWithLDAP.java and krb5/canonicalize/Test.java
  • Type: Bug
  • Component: security-libs
  • Sub-Component: java.security
  • Affected Version: 8,11,17
  • Priority: P4
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2021-03-02
  • Updated: 2021-08-15
  • Resolved: 2021-03-05
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 11 JDK 17 JDK 8
11.0.13-oracleFixed 17 b13Fixed 8u311Fixed
Related Reports
Duplicate :  
Relates :  
Relates :  
Description
Certain JVM tools may access InetAddress and initialise its static members during start-up resulting in a NameService configuration being already set to the default PlatformNameService, causing issues in the following tests which expects the use of HostsFileNameService instead:
sun/security/krb5/canonicalize/Test.java and sun/security/x509/URICertStore/ExtensionsWithLDAP.java


ExtensionsWithLDAP.java log file snippet:

----------System.err:(13/936)----------
java.lang.RuntimeException: The ldap.host.for.crldp from CRLDP extension is not requested
at ExtensionsWithLDAP.main(ExtensionsWithLDAP.java:174)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:78)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:566)
at com.sun.javatest.regtest.agent.MainWrapper$MainThread.run(MainWrapper.java:127)
at java.base/java.lang.Thread.run(Thread.java:831)

-------------------------


canonicalize/Test.java log file snippet:

----------System.err:(14/816)----------
java.lang.Exception: Output is host/c1@THIS.REALM
at Test.check(Test.java:65)
at Test.main(Test.java:44)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:78)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:566)
at com.sun.javatest.regtest.agent.MainWrapper$MainThread.run(MainWrapper.java:127)
at java.base/java.lang.Thread.run(Thread.java:831)

JavaTest Message: Test threw exception: java.lang.Exception: Output is host/c1@THIS.REALM
-------------------------

Comments
Fix Request (11u) Improves testing and matches 11.0.13-oracle. Patch applies cleanly, affected testing still pass.
13-08-2021

Changeset: e1cad970 Author: Fernando Guallini <fguallini@openjdk.org> Committer: Aleksei Efimov <aefimov@openjdk.org> Date: 2021-03-05 16:26:05 +0000 URL: https://git.openjdk.java.net/jdk/commit/e1cad970
05-03-2021