-
Notifications
You must be signed in to change notification settings - Fork 6.1k
8370852: Test sun/security/ssl/SSLLogger/DebugPropertyValuesTest.java fails after JDK-8369995 #28045
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Closed
Closed
8370852: Test sun/security/ssl/SSLLogger/DebugPropertyValuesTest.java fails after JDK-8369995 #28045
Changes from all commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
1f82e22
JDK-8370852: Test sun/security/ssl/SSLLogger/DebugPropertyValuesTest.…
myankelev 73c7346
JDK-8370852: Test sun/security/ssl/SSLLogger/DebugPropertyValuesTest.…
myankelev 09bb1ab
choosing -> Choosing
myankelev 1691d64
turbanoff's comment
myankelev File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -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 | ||
|
|
@@ -50,24 +50,27 @@ | |
| public class DebugPropertyValuesTest extends SSLSocketTemplate { | ||
|
|
||
| private static final Path LOG_FILE = Path.of("logging.conf"); | ||
| private static final HashMap<String, List<String>> debugMessages = new HashMap<>(); | ||
| private static final HashMap<String, List<String>> 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("keymanager", List.of("Choosing key:")); | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Is this what caused the test to fail? everything else looks like formatting changes.
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yes, it was changed in JDK-8369995 |
||
| 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\" : \\[", | ||
|
|
@@ -114,15 +117,18 @@ private static Stream<Arguments> patternMatches() { | |
| "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", | ||
| "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", | ||
| "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", | ||
|
|
@@ -147,30 +153,33 @@ private static Stream<Arguments> patternMatches() { | |
| "record", "session", "ssl", | ||
| "sslctx", "trustmanager", "verbose")), | ||
| // plaintext is valid for record option | ||
| Arguments.of(List.of("-Djavax.net.debug=ssl:record:plaintext"), | ||
| Arguments.of( | ||
| List.of("-Djavax.net.debug=ssl:record:plaintext"), | ||
| List.of("handshake", "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", "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", "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", | ||
| "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", | ||
| "keymanager", "packet", "plaintext", | ||
| "record", "session", "ssl", | ||
| "sslctx", "trustmanager", "verbose")) | ||
| ); | ||
|
|
||
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
no bug ID should be inserted for test only fixes (AFAIK)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In this case I didn't put the current bug ID (test only one), only the product bug id which caused the error to occur. So I believe it's justified in this case.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ah, I see - yes, that seems fine then