-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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
quic: improve coverage #16569
quic: improve coverage #16569
Conversation
Signed-off-by: Alyssa Wilk <[email protected]>
Signed-off-by: Alyssa Wilk <[email protected]>
Signed-off-by: Alyssa Wilk <[email protected]>
@@ -0,0 +1,47 @@ | |||
#include "common/quic/client_connection_factory_impl.h" |
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.
Thanks for adding these tests!
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.
Thanks for the test coverage improvements.
Given that we are removing ASSERTs, I think we should add some nullptr checks to avoid crashes in EnvoyQuicProofVerifier::VerifyCertChain
@@ -19,7 +19,6 @@ getContext(Network::TransportSocketFactory& transport_socket_factory) { | |||
auto* quic_socket_factory = | |||
dynamic_cast<QuicClientTransportSocketFactory*>(&transport_socket_factory); | |||
ASSERT(quic_socket_factory != nullptr); | |||
ASSERT(quic_socket_factory->sslCtx() != nullptr); |
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.
If this ASSERT were to fail the following code would crash. If we remove the ASSERT, we should also fix this code so it doesn't crash.
bool success = static_cast<Extensions::TransportSockets::Tls::ClientContextImpl*>(context_.get()) |
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.
This is already removed over here #16462
just hadn't merged it in.
That PR came with tests and error handling for SDS lazy loading of secrets :-)
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.
nit: Could we add ASSERT(context_ != nullptr) to the EnvoyQuicProofVerifier constructor as a sanity check? I'm fine with it being in this PR or a followup.
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.
added in #16466 thanks
@@ -77,7 +77,7 @@ class QuicFilterManagerConnectionImpl : public Network::ConnectionImplBase, | |||
absl::optional<Network::Connection::UnixDomainSocketPeerCredentials> | |||
unixSocketPeerCredentials() const override { | |||
// Unix domain socket is not supported. | |||
NOT_REACHED_GCOVR_EXCL_LINE; | |||
return absl::nullopt; |
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.
I'm having trouble finding non-test uses of unixSocketPeerCredentials().
What am I missing? Who depends on this API?
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.
Not sure. I'd be happy to remove as a follow-up if we think it's doable.
I wonder if it's used internally by whoever @snowp worked for at the time?
This has broken four CI pipelines... better to revert for now? |
#16597 should fix |
Risk Level: n/a (test only) Testing: yes Docs Changes: n/a Release Notes: n/a Signed-off-by: Alyssa Wilk <[email protected]>
Arguably I should adjust this up but given recent CI failures I'll leave for now.
Risk Level: n/a (test only)
Testing: yes
Docs Changes: n/a
Release Notes: n/a