-
Notifications
You must be signed in to change notification settings - Fork 726
Reduce use of library internals in tests #2421
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
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #2421 +/- ##
=======================================
Coverage 96.00% 96.01%
=======================================
Files 94 94
Lines 22525 22578 +53
=======================================
+ Hits 21626 21678 +52
- Misses 899 900 +1 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Benchmark resultsInstruction countsSignificant differencesThere are no significant instruction count differences Other differencesClick to expand
Wall-timeSignificant differencesClick to expand
Other differencesClick to expand
Additional informationCheckout details:
|
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.
Seems nice! This commit has a lot going on, do you think it can profitably split up in some smaller stages?
569dd42
to
60c781a
Compare
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.
Very nice 👏
60c781a
to
ea7b3d7
Compare
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.
Nice! I think the commit history would be nicer if it flowed the other way:
message_framing()
(last commit with bits it needs from the new module)handshake_framing()
(half of the second commit)
This would split the introduction of the encoding
module starting with the lower-level bits and working up to the higher-level functions.
ea7b3d7
to
02df69a
Compare
This PR reduces the reliance of our tests on internal types for the future benefit of #1475.
Instead of that,
tests::common::encoding
is some very stupid code that can produce a variety of client hellos. Making that separate also means we're not testing rustls against itself, and the test code is not fighting against the type-safe internals code when constructing invalid input (see, eg,server_rejects_sni_with_illegal_dns_name
).