From 1f82e22b5129e089951ed272f2aeb9376d732629 Mon Sep 17 00:00:00 2001 From: Mikhail Yankelevich Date: Wed, 29 Oct 2025 14:23:05 +0000 Subject: [PATCH 1/4] JDK-8370852: Test sun/security/ssl/SSLLogger/DebugPropertyValuesTest.java fails after JDK-8369995 --- test/jdk/ProblemList.txt | 2 - .../SSLLogger/DebugPropertyValuesTest.java | 67 +++++++++++-------- 2 files changed, 38 insertions(+), 31 deletions(-) diff --git a/test/jdk/ProblemList.txt b/test/jdk/ProblemList.txt index d1644a56100b3..f7b8939ac6a85 100644 --- a/test/jdk/ProblemList.txt +++ b/test/jdk/ProblemList.txt @@ -637,8 +637,6 @@ sun/security/smartcardio/TestTransmit.java 8039280 generic- sun/security/pkcs11/sslecc/ClientJSSEServerJSSE.java 8316183 linux-ppc64le -sun/security/ssl/SSLLogger/DebugPropertyValuesTest.java 8370852 generic-all - ############################################################################ # jdk_sound diff --git a/test/jdk/sun/security/ssl/SSLLogger/DebugPropertyValuesTest.java b/test/jdk/sun/security/ssl/SSLLogger/DebugPropertyValuesTest.java index 726cc516267ec..d48b6ca818433 100644 --- a/test/jdk/sun/security/ssl/SSLLogger/DebugPropertyValuesTest.java +++ b/test/jdk/sun/security/ssl/SSLLogger/DebugPropertyValuesTest.java @@ -50,24 +50,27 @@ public class DebugPropertyValuesTest extends SSLSocketTemplate { private static final Path LOG_FILE = Path.of("logging.conf"); - private static final HashMap> debugMessages = new HashMap<>(); + private static final HashMap> debugMessages = + new HashMap<>(); private static final String DATE_REGEX = "\\d{4}-\\d{2}-\\d{2}"; static { - - debugMessages.put("handshake", List.of("Produced ClientHello handshake message", "supported_versions")); debugMessages.put("keymanager", List.of("choosing key:")); debugMessages.put("packet", List.of("Raw write")); - debugMessages.put("plaintext", List.of("Plaintext before ENCRYPTION")); + debugMessages.put("plaintext", + List.of("Plaintext before ENCRYPTION")); debugMessages.put("record", List.of("handshake, length =", "WRITE:")); debugMessages.put("session", List.of("Session initialized:")); - debugMessages.put("sslctx", List.of("trigger seeding of SecureRandom")); + debugMessages.put("sslctx", + List.of("trigger seeding of SecureRandom")); debugMessages.put("ssl", List.of("jdk.tls.keyLimits:")); - debugMessages.put("trustmanager", List.of("adding as trusted certificates")); - debugMessages.put("verbose", List.of("Ignore unsupported cipher suite:")); + debugMessages.put("trustmanager", + List.of("adding as trusted certificates")); + debugMessages.put("verbose", + List.of("Ignore unsupported cipher suite:")); debugMessages.put("handshake-expand", List.of("\"logger\".*: \"javax.net.ssl\",", "\"specifics\" : \\[", @@ -105,27 +108,30 @@ private static Stream patternMatches() { return Stream.of( // all should print everything Arguments.of(List.of("-Djavax.net.debug=all"), - List.of("handshake", "keymanager", "packet", + List.of("handshake", "ssl,keymanager", "packet", "plaintext", "record", "session", "ssl", "sslctx", "trustmanager", "verbose")), // ssl should print most details except verbose details Arguments.of(List.of("-Djavax.net.debug=ssl"), - List.of("handshake", "keymanager", + List.of("handshake", "ssl,keymanager", "record", "session", "ssl", "sslctx", "trustmanager", "verbose")), // allow expand option for more verbose output - Arguments.of(List.of("-Djavax.net.debug=ssl,handshake,expand"), - List.of("handshake", "handshake-expand", "keymanager", - "record", "session", "record-expand", "ssl", - "sslctx", "trustmanager", "verbose")), + Arguments.of( + List.of("-Djavax.net.debug=ssl,handshake,expand"), + List.of("handshake", "handshake-expand", + "ssl,keymanager", "record", "session", + "record-expand", "ssl", "sslctx", + "trustmanager", "verbose")), // filtering on record option, with expand Arguments.of(List.of("-Djavax.net.debug=ssl:record,expand"), - List.of("handshake", "handshake-expand", "keymanager", - "record", "record-expand", "session", "ssl", - "sslctx", "trustmanager", "verbose")), + List.of("handshake", "handshake-expand", + "ssl,keymanager", "record", "record-expand", + "session", "ssl", "sslctx", "trustmanager", + "verbose")), // this test is equivalent to ssl:record mode Arguments.of(List.of("-Djavax.net.debug=ssl,record"), - List.of("handshake", "keymanager", "record", + List.of("handshake", "ssl,keymanager", "record", "session", "ssl", "sslctx", "trustmanager", "verbose")), // example of test where no "ssl" value is passed @@ -138,39 +144,42 @@ private static Stream patternMatches() { List.of("record")), // ignore bad sub-option. treat like "ssl" Arguments.of(List.of("-Djavax.net.debug=ssl,typo"), - List.of("handshake", "keymanager", + List.of("handshake", "ssl,keymanager", "record", "session", "ssl", "sslctx", "trustmanager", "verbose")), // ssltypo contains "ssl". Treat like "ssl" Arguments.of(List.of("-Djavax.net.debug=ssltypo"), - List.of("handshake", "keymanager", + List.of("handshake", "ssl,keymanager", "record", "session", "ssl", "sslctx", "trustmanager", "verbose")), // plaintext is valid for record option - Arguments.of(List.of("-Djavax.net.debug=ssl:record:plaintext"), - List.of("handshake", "keymanager", "plaintext", + Arguments.of( + List.of("-Djavax.net.debug=ssl:record:plaintext"), + List.of("handshake", "ssl,keymanager", "plaintext", "record", "session", "ssl", "sslctx", "trustmanager", "verbose")), Arguments.of(List.of("-Djavax.net.debug=ssl:trustmanager"), - List.of("handshake", "keymanager", "record", "session", - "ssl", "sslctx", "trustmanager", "verbose")), + List.of("handshake", "ssl,keymanager", "record", + "session", "ssl", "sslctx", "trustmanager", + "verbose")), Arguments.of(List.of("-Djavax.net.debug=ssl:sslctx"), - List.of("handshake", "keymanager", "record", "session", - "ssl", "sslctx", "trustmanager", "verbose")), + List.of("handshake", "ssl,keymanager", "record", + "session", "ssl", "sslctx", "trustmanager", + "verbose")), // help message test. Should exit without running test Arguments.of(List.of("-Djavax.net.debug=help"), List.of("help")), // add in javax.net.debug sanity test Arguments.of(List.of("-Djavax.net.debug=ssl:trustmanager", "-Djava.security.debug=all"), - List.of("handshake", "java.security.debug", "keymanager", - "record", "session", "ssl", "sslctx", - "trustmanager", "verbose")), + List.of("handshake", "java.security.debug", + "ssl,keymanager", "record", "session", "ssl", + "sslctx", "trustmanager", "verbose")), // empty invokes System.Logger use Arguments.of(List.of("-Djavax.net.debug", "-Djava.util.logging.config.file=" + LOG_FILE), List.of("handshake", "javax.net.debug.logger", - "keymanager", "packet", "plaintext", + "ssl,keymanager", "packet", "plaintext", "record", "session", "ssl", "sslctx", "trustmanager", "verbose")) ); From 73c7346dfedf387b736645d87fdccb2b862451b4 Mon Sep 17 00:00:00 2001 From: Mikhail Yankelevich Date: Wed, 29 Oct 2025 14:23:05 +0000 Subject: [PATCH 2/4] JDK-8370852: Test sun/security/ssl/SSLLogger/DebugPropertyValuesTest.java fails after JDK-8369995 --- .../jdk/sun/security/ssl/SSLLogger/DebugPropertyValuesTest.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/jdk/sun/security/ssl/SSLLogger/DebugPropertyValuesTest.java b/test/jdk/sun/security/ssl/SSLLogger/DebugPropertyValuesTest.java index d48b6ca818433..8b4ffc6a3ac0f 100644 --- a/test/jdk/sun/security/ssl/SSLLogger/DebugPropertyValuesTest.java +++ b/test/jdk/sun/security/ssl/SSLLogger/DebugPropertyValuesTest.java @@ -23,7 +23,7 @@ /** * @test - * @bug 8350582 8340312 + * @bug 8350582 8340312 8369995 * @library /test/lib /javax/net/ssl/templates * @summary Correct the parsing of the ssl value in javax.net.debug * @run junit DebugPropertyValuesTest From 09bb1ab549e220a595042c2aa3b54450ee2a1e3f Mon Sep 17 00:00:00 2001 From: Mikhail Yankelevich Date: Thu, 30 Oct 2025 10:09:08 +0000 Subject: [PATCH 3/4] choosing -> Choosing --- .../SSLLogger/DebugPropertyValuesTest.java | 26 +++++++++---------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/test/jdk/sun/security/ssl/SSLLogger/DebugPropertyValuesTest.java b/test/jdk/sun/security/ssl/SSLLogger/DebugPropertyValuesTest.java index 8b4ffc6a3ac0f..6d108febc850d 100644 --- a/test/jdk/sun/security/ssl/SSLLogger/DebugPropertyValuesTest.java +++ b/test/jdk/sun/security/ssl/SSLLogger/DebugPropertyValuesTest.java @@ -58,7 +58,7 @@ public class DebugPropertyValuesTest extends SSLSocketTemplate { debugMessages.put("handshake", List.of("Produced ClientHello handshake message", "supported_versions")); - debugMessages.put("keymanager", List.of("choosing key:")); + debugMessages.put("keymanager", List.of("Choosing key:")); debugMessages.put("packet", List.of("Raw write")); debugMessages.put("plaintext", List.of("Plaintext before ENCRYPTION")); @@ -108,30 +108,30 @@ private static Stream patternMatches() { return Stream.of( // all should print everything Arguments.of(List.of("-Djavax.net.debug=all"), - List.of("handshake", "ssl,keymanager", "packet", + List.of("handshake", "keymanager", "packet", "plaintext", "record", "session", "ssl", "sslctx", "trustmanager", "verbose")), // ssl should print most details except verbose details Arguments.of(List.of("-Djavax.net.debug=ssl"), - List.of("handshake", "ssl,keymanager", + List.of("handshake", "keymanager", "record", "session", "ssl", "sslctx", "trustmanager", "verbose")), // allow expand option for more verbose output Arguments.of( List.of("-Djavax.net.debug=ssl,handshake,expand"), List.of("handshake", "handshake-expand", - "ssl,keymanager", "record", "session", + "keymanager", "record", "session", "record-expand", "ssl", "sslctx", "trustmanager", "verbose")), // filtering on record option, with expand Arguments.of(List.of("-Djavax.net.debug=ssl:record,expand"), List.of("handshake", "handshake-expand", - "ssl,keymanager", "record", "record-expand", + "keymanager", "record", "record-expand", "session", "ssl", "sslctx", "trustmanager", "verbose")), // this test is equivalent to ssl:record mode Arguments.of(List.of("-Djavax.net.debug=ssl,record"), - List.of("handshake", "ssl,keymanager", "record", + List.of("handshake", "keymanager", "record", "session", "ssl", "sslctx", "trustmanager", "verbose")), // example of test where no "ssl" value is passed @@ -144,26 +144,26 @@ private static Stream patternMatches() { List.of("record")), // ignore bad sub-option. treat like "ssl" Arguments.of(List.of("-Djavax.net.debug=ssl,typo"), - List.of("handshake", "ssl,keymanager", + List.of("handshake", "keymanager", "record", "session", "ssl", "sslctx", "trustmanager", "verbose")), // ssltypo contains "ssl". Treat like "ssl" Arguments.of(List.of("-Djavax.net.debug=ssltypo"), - List.of("handshake", "ssl,keymanager", + List.of("handshake", "keymanager", "record", "session", "ssl", "sslctx", "trustmanager", "verbose")), // plaintext is valid for record option Arguments.of( List.of("-Djavax.net.debug=ssl:record:plaintext"), - List.of("handshake", "ssl,keymanager", "plaintext", + List.of("handshake", "keymanager", "plaintext", "record", "session", "ssl", "sslctx", "trustmanager", "verbose")), Arguments.of(List.of("-Djavax.net.debug=ssl:trustmanager"), - List.of("handshake", "ssl,keymanager", "record", + List.of("handshake", "keymanager", "record", "session", "ssl", "sslctx", "trustmanager", "verbose")), Arguments.of(List.of("-Djavax.net.debug=ssl:sslctx"), - List.of("handshake", "ssl,keymanager", "record", + List.of("handshake", "keymanager", "record", "session", "ssl", "sslctx", "trustmanager", "verbose")), // help message test. Should exit without running test @@ -173,13 +173,13 @@ private static Stream patternMatches() { Arguments.of(List.of("-Djavax.net.debug=ssl:trustmanager", "-Djava.security.debug=all"), List.of("handshake", "java.security.debug", - "ssl,keymanager", "record", "session", "ssl", + "keymanager", "record", "session", "ssl", "sslctx", "trustmanager", "verbose")), // empty invokes System.Logger use Arguments.of(List.of("-Djavax.net.debug", "-Djava.util.logging.config.file=" + LOG_FILE), List.of("handshake", "javax.net.debug.logger", - "ssl,keymanager", "packet", "plaintext", + "keymanager", "packet", "plaintext", "record", "session", "ssl", "sslctx", "trustmanager", "verbose")) ); From 1691d64fbb683e77bb70032b06f1466a6384fda5 Mon Sep 17 00:00:00 2001 From: Mikhail Yankelevich Date: Thu, 30 Oct 2025 10:12:47 +0000 Subject: [PATCH 4/4] turbanoff's comment --- .../jdk/sun/security/ssl/SSLLogger/DebugPropertyValuesTest.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/jdk/sun/security/ssl/SSLLogger/DebugPropertyValuesTest.java b/test/jdk/sun/security/ssl/SSLLogger/DebugPropertyValuesTest.java index 6d108febc850d..fbd20e588d1dd 100644 --- a/test/jdk/sun/security/ssl/SSLLogger/DebugPropertyValuesTest.java +++ b/test/jdk/sun/security/ssl/SSLLogger/DebugPropertyValuesTest.java @@ -179,7 +179,7 @@ private static Stream patternMatches() { Arguments.of(List.of("-Djavax.net.debug", "-Djava.util.logging.config.file=" + LOG_FILE), List.of("handshake", "javax.net.debug.logger", - "keymanager", "packet", "plaintext", + "keymanager", "packet", "plaintext", "record", "session", "ssl", "sslctx", "trustmanager", "verbose")) );