-
Notifications
You must be signed in to change notification settings - Fork 5.5k
Windows: Fix quiche test compilation #12898
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
Changes from 1 commit
14398f0
44430ed
e99d52d
bbcc905
16b4768
567765b
4496617
0d13c26
2df2ef9
ba3b31f
761b537
8e19e61
0403ba7
f9c1f01
ab26231
7672f9b
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -26,6 +26,7 @@ | |
| #include "common/common/logger.h" | ||
| #include "common/network/listen_socket_impl.h" | ||
| #include "common/network/socket_option_factory.h" | ||
| #include "common/network/udp_packet_writer_handler_impl.h" | ||
| #include "extensions/quic_listeners/quiche/active_quic_listener.h" | ||
| #include "test/extensions/quic_listeners/quiche/test_utils.h" | ||
| #include "test/extensions/quic_listeners/quiche/test_proof_source.h" | ||
|
|
@@ -42,8 +43,11 @@ | |
| #include "gmock/gmock.h" | ||
| #include "extensions/quic_listeners/quiche/active_quic_listener_config.h" | ||
| #include "extensions/quic_listeners/quiche/platform/envoy_quic_clock.h" | ||
| #include "extensions/quic_listeners/quiche/envoy_quic_packet_writer.h" | ||
| #include "extensions/quic_listeners/quiche/envoy_quic_utils.h" | ||
| #ifndef WIN32 | ||
| #include "extensions/quic_listeners/quiche/udp_gso_batch_writer.h" | ||
| #endif | ||
|
|
||
| using testing::Return; | ||
| using testing::ReturnRef; | ||
|
|
@@ -111,15 +115,21 @@ class ActiveQuicListenerTest : public QuicMultiVersionTest { | |
| ON_CALL(listener_config_, listenSocketFactory()).WillByDefault(ReturnRef(socket_factory_)); | ||
| ON_CALL(socket_factory_, getListenSocket()).WillByDefault(Return(listen_socket_)); | ||
|
|
||
| // Use UdpGsoBatchWriter to perform non-batched writes for the purpose of this test | ||
| ON_CALL(listener_config_, udpPacketWriterFactory()) | ||
| .WillByDefault(Return( | ||
| std::reference_wrapper<Network::UdpPacketWriterFactory>(udp_packet_writer_factory_))); | ||
| ON_CALL(udp_packet_writer_factory_, createUdpPacketWriter(_, _)) | ||
| .WillByDefault(Invoke( | ||
| [&](Network::IoHandle& io_handle, Stats::Scope& scope) -> Network::UdpPacketWriterPtr { | ||
| #ifndef WIN32 | ||
| // Use UdpGsoBatchWriter to perform non-batched writes for the purpose of this test | ||
| Network::UdpPacketWriterPtr udp_packet_writer = | ||
| std::make_unique<Quic::UdpGsoBatchWriter>(io_handle, scope); | ||
| #else | ||
| // UdpGsoBatchWriter cannot be supported on Windows, use UdpDefaultWriter instead | ||
| Network::UdpPacketWriterPtr udp_packet_writer = | ||
| std::make_unique<Network::UdpDefaultWriter>(io_handle); | ||
|
Member
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. The need for this change will go away after #13086 merges. @danzh2010 what was the reason for using the GSO batch writer in this test instead of the default writer? Coverage?
Member
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. Let's wait for the other PR to merge and then come back to this. It should merge soon. /wait
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.
Just to test more the interaction between the batch writer and QUIC listener because mostly likely the batch writer will be used in production. |
||
| #endif | ||
| return udp_packet_writer; | ||
| })); | ||
|
|
||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -13,10 +13,9 @@ envoy_cc_test( | |
| size = "medium", | ||
| srcs = ["quic_http_integration_test.cc"], | ||
| data = ["//test/config/integration/certs"], | ||
| # Skipping as quiche quic_stream_send_buffer.cc does not currently compile on Windows | ||
| tags = [ | ||
| "fails_on_windows", | ||
|
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. I'm curious which test fails on Windows. Can you file an issue about the test failure?
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. Yup (actually, now two failures since the last merge) #13273 |
||
| "nofips", | ||
| "skip_on_windows", | ||
| ], | ||
| deps = [ | ||
| "//source/extensions/filters/http/dynamo:config", | ||
|
|
||
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 thought @ggreenway had fixed this so we don't need ifdef for this anymore, at least in the main code. Is there any way to avoid the ifdef in this test?
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.
IIUC this specific test does validate udp_gso_batch_writer by name, not the generic wrapper which is windows agnostic, but I could be wrong; @ggreenway ?
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.
Optimally we would not have this type of ifdef/dependency in the test. IMO I would just remove it entirely and do whatever you did on Windows. In the interest of moving this forward I would be fine with a TODO and a follow up?
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.
The change that removed the need for this ifdef isn't merged yet. It's #13086
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 an effort to also see that 13086 doesn't add more regressions to work around under windows, lets get it running under CI. Since that PR will simplify this particular test, does the new workaround above satisfy everyone?
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.
(Modulo an error I've introduced and need to fix)
/wait
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.
Fix should be in... waiting on CI confirmation
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 resolved. Note the introduction of new build failures. Because these are batch writer related, we are marking that test failing on windows, for the time being, as it's a regression in the most recent batch writer refactoring. Let's get this merged to avoid future breakage and we'll need to unwind the two broken tests.