Skip to content
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

network: update network test-coverage expectations and add one simple coverage improvement #14547

Merged
merged 1 commit into from
Jan 3, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 6 additions & 12 deletions source/common/network/transport_socket_options_impl.cc
Original file line number Diff line number Diff line change
Expand Up @@ -24,24 +24,18 @@ void commonHashKey(const TransportSocketOptions& options, std::vector<std::uint8
}

const auto& verify_san_list = options.verifySubjectAltNameListOverride();
if (!verify_san_list.empty()) {
for (const auto& san : verify_san_list) {
pushScalarToByteVector(StringUtil::CaseInsensitiveHash()(san), key);
}
for (const auto& san : verify_san_list) {
pushScalarToByteVector(StringUtil::CaseInsensitiveHash()(san), key);
}

const auto& alpn_list = options.applicationProtocolListOverride();
if (!alpn_list.empty()) {
for (const auto& protocol : alpn_list) {
pushScalarToByteVector(StringUtil::CaseInsensitiveHash()(protocol), key);
}
for (const auto& protocol : alpn_list) {
pushScalarToByteVector(StringUtil::CaseInsensitiveHash()(protocol), key);
}

const auto& alpn_fallback = options.applicationProtocolFallback();
if (!alpn_fallback.empty()) {
for (const auto& protocol : alpn_fallback) {
pushScalarToByteVector(StringUtil::CaseInsensitiveHash()(protocol), key);
}
for (const auto& protocol : alpn_fallback) {
pushScalarToByteVector(StringUtil::CaseInsensitiveHash()(protocol), key);
}

// Proxy protocol options should only be included in the hash if the upstream
Expand Down
2 changes: 1 addition & 1 deletion test/per_file_coverage.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ declare -a KNOWN_LOW_COVERAGE=(
"source/common/http/http3:50.0"
"source/common/init:96.4"
"source/common/json:90.6"
"source/common/network:95.3"
"source/common/network:95.1"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Did you mean to drop this lower?

/wait-any

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes I meant to revert the effects of #14472 on this particular directory. I think Alyssa's earlier "ratcheting" PR was a bit aggressive and there's something flaky in this test-tree that affects coverage.

I don't think my opportunistic simplification in transport_socket_options_impl.cc will reliably get us closer to 95.3. I think the main issue in this directory is a bunch of constexpr conditionals that were added recently.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK got it, thanks.

"source/common/protobuf:94.6"
"source/common/signal:84.5" # Death tests don't report LCOV
"source/common/singleton:95.1"
Expand Down