From 3861a763674b44f57a03c6677672af7f6071f31f Mon Sep 17 00:00:00 2001 From: Nick Banks Date: Mon, 4 Dec 2023 14:00:10 -0500 Subject: [PATCH] Fix Internal Build Referencing Preview Features (#3982) --- src/test/bin/quic_gtest.cpp | 2 ++ src/test/bin/winkernel/control.cpp | 2 ++ src/test/lib/ApiTest.cpp | 3 +++ src/test/lib/DataTest.cpp | 4 +++- src/test/lib/EventTest.cpp | 6 ++++++ 5 files changed, 16 insertions(+), 1 deletion(-) diff --git a/src/test/bin/quic_gtest.cpp b/src/test/bin/quic_gtest.cpp index 19cf10e0b..9b5c99317 100644 --- a/src/test/bin/quic_gtest.cpp +++ b/src/test/bin/quic_gtest.cpp @@ -2126,6 +2126,7 @@ TEST(Misc, StreamBlockUnblockBidiConnFlowControl) { } } +#ifdef QUIC_PARAM_STREAM_RELIABLE_OFFSET TEST(Misc, StreamReliableReset) { TestLogger Logger("StreamReliableReset"); if (TestingKernelMode) { @@ -2143,6 +2144,7 @@ TEST(Misc, StreamReliableResetMultipleSends) { QuicTestStreamReliableResetMultipleSends(); } } +#endif // QUIC_PARAM_STREAM_RELIABLE_OFFSET TEST(Misc, StreamBlockUnblockUnidiConnFlowControl) { TestLogger Logger("StreamBlockUnblockUnidiConnFlowControl"); diff --git a/src/test/bin/winkernel/control.cpp b/src/test/bin/winkernel/control.cpp index c43f4c781..3f3353a19 100644 --- a/src/test/bin/winkernel/control.cpp +++ b/src/test/bin/winkernel/control.cpp @@ -1490,6 +1490,7 @@ QuicTestCtlEvtIoDeviceControl( Params->CustomCertValidationParams.AcceptCert, Params->CustomCertValidationParams.AsyncValidation)); break; + #ifdef QUIC_API_ENABLE_PREVIEW_FEATURES case IOCTL_QUIC_RELIABLE_RESET_NEGOTIATION: CXPLAT_FRE_ASSERT(Params != nullptr); @@ -1499,6 +1500,7 @@ QuicTestCtlEvtIoDeviceControl( Params->FeatureNegotiationParams.ServerSupport, Params->FeatureNegotiationParams.ClientSupport)); break; + case IOCTL_QUIC_ONE_WAY_DELAY_NEGOTIATION: CXPLAT_FRE_ASSERT(Params != nullptr); QuicTestCtlRun( diff --git a/src/test/lib/ApiTest.cpp b/src/test/lib/ApiTest.cpp index 4142520b5..a510c1a85 100644 --- a/src/test/lib/ApiTest.cpp +++ b/src/test/lib/ApiTest.cpp @@ -4998,6 +4998,8 @@ void QuicTestStreamParam() TEST_EQUAL(Length, sizeof(QUIC_STREAM_STATISTICS)); } } + +#ifdef QUIC_PARAM_STREAM_RELIABLE_OFFSET // // QUIC_PARAM_STREAM_RELIABLE_OFFSET // QUIC_PARAM_STREAM_RELIABLE_OFFSET_RECV @@ -5066,6 +5068,7 @@ void QuicTestStreamParam() &Buffer)); } } +#endif // QUIC_PARAM_STREAM_RELIABLE_OFFSET } void diff --git a/src/test/lib/DataTest.cpp b/src/test/lib/DataTest.cpp index cd9104489..c3cda1c0c 100644 --- a/src/test/lib/DataTest.cpp +++ b/src/test/lib/DataTest.cpp @@ -3336,7 +3336,7 @@ struct StreamReliableReset { } }; - +#ifdef QUIC_PARAM_STREAM_RELIABLE_OFFSET void QuicTestStreamReliableReset( ) @@ -3410,6 +3410,7 @@ QuicTestStreamReliableReset( TEST_TRUE(Context.ShutdownErrorCode == AbortSendShutdownErrorCode); } } + void QuicTestStreamReliableResetMultipleSends( ) @@ -3492,3 +3493,4 @@ QuicTestStreamReliableResetMultipleSends( // Test Error code matches what we sent. TEST_TRUE(Context.ShutdownErrorCode == AbortShutdownErrorCode); } +#endif // QUIC_PARAM_STREAM_RELIABLE_OFFSET diff --git a/src/test/lib/EventTest.cpp b/src/test/lib/EventTest.cpp index bade9c0dc..0004ec228 100644 --- a/src/test/lib/EventTest.cpp +++ b/src/test/lib/EventTest.cpp @@ -1457,6 +1457,7 @@ QuicTestValidateStreamEvents9( { TestScopeLogger ScopeLogger(__FUNCTION__); +#ifdef QUIC_PARAM_STREAM_RELIABLE_OFFSET MsQuicSettings Settings; Settings.SetPeerBidiStreamCount(1).SetMinimumMtu(1280).SetMaximumMtu(1280); Settings.SetReliableResetEnabled(true); @@ -1575,6 +1576,11 @@ QuicTestValidateStreamEvents9( TEST_TRUE(Server.Complete.WaitTimeout(1000)); } // Stream scope } // Connections scope +#else // QUIC_PARAM_STREAM_RELIABLE_OFFSET + UNREFERENCED_PARAMETER(Registration); + UNREFERENCED_PARAMETER(Listener); + UNREFERENCED_PARAMETER(ServerLocalAddr); +#endif // QUIC_PARAM_STREAM_RELIABLE_OFFSET } void QuicTestValidateStreamEvents(uint32_t Test)