From f2c962919be19bcf89a3ae775a7a0dc824183242 Mon Sep 17 00:00:00 2001 From: Masahiro Kozuka Date: Sat, 21 Dec 2024 10:03:31 +0900 Subject: [PATCH] Define local address management parameters only when preview features enabled --- src/inc/msquic.h | 2 ++ src/test/bin/quic_gtest.cpp | 4 +++- src/test/bin/quic_gtest.h | 2 ++ src/test/lib/ApiTest.cpp | 4 ++++ src/test/lib/PathTest.cpp | 2 ++ 5 files changed, 13 insertions(+), 1 deletion(-) diff --git a/src/inc/msquic.h b/src/inc/msquic.h index 9cf84575d6..e5f8e34bc4 100644 --- a/src/inc/msquic.h +++ b/src/inc/msquic.h @@ -922,8 +922,10 @@ typedef struct QUIC_SCHANNEL_CREDENTIAL_ATTRIBUTE_W { #define QUIC_PARAM_CONN_STATISTICS_V2 0x05000016 // QUIC_STATISTICS_V2 #define QUIC_PARAM_CONN_STATISTICS_V2_PLAT 0x05000017 // QUIC_STATISTICS_V2 #define QUIC_PARAM_CONN_ORIG_DEST_CID 0x05000018 // uint8_t[] +#ifdef QUIC_API_ENABLE_PREVIEW_FEATURES #define QUIC_PARAM_CONN_ADD_LOCAL_ADDRESS 0x05000019 // QUIC_ADDR #define QUIC_PARAM_CONN_REMOVE_LOCAL_ADDRESS 0x0500001A // QUIC_ADDR +#endif // // Parameters for TLS. diff --git a/src/test/bin/quic_gtest.cpp b/src/test/bin/quic_gtest.cpp index 26a197bc19..4afd543d4c 100644 --- a/src/test/bin/quic_gtest.cpp +++ b/src/test/bin/quic_gtest.cpp @@ -1666,6 +1666,7 @@ TEST_P(WithFamilyArgs, PathValidationTimeout) { } } +#if defined(QUIC_API_ENABLE_PREVIEW_FEATURES) TEST_P(WithProbePathArgs, ProbePath) { TestLoggerT Logger("QuicTestProbePath", GetParam()); if (TestingKernelMode) { @@ -1716,7 +1717,8 @@ TEST_P(WithProbePathArgs, MultipleLocalAddresses) { GetParam().DropPacketCount); } } -#endif +#endif // QUIC_API_ENABLE_PREVIEW_FEATURES +#endif // QUIC_TEST_DATAPATH_HOOKS_ENABLED TEST_P(WithFamilyArgs, ChangeMaxStreamIDs) { TestLoggerT Logger("QuicTestChangeMaxStreamID", GetParam()); diff --git a/src/test/bin/quic_gtest.h b/src/test/bin/quic_gtest.h index 1f68173c07..469670f821 100644 --- a/src/test/bin/quic_gtest.h +++ b/src/test/bin/quic_gtest.h @@ -930,6 +930,7 @@ class WithValidateTlsConfigArgs : public testing::Test, public testing::WithParamInterface { }; +#if defined(QUIC_API_ENABLE_PREVIEW_FEATURES) struct ProbePathArgs { int Family; BOOLEAN ShareBinding; @@ -980,3 +981,4 @@ std::ostream& operator << (std::ostream& o, const MigrationArgs& args) { class WithMigrationArgs : public testing::Test, public testing::WithParamInterface { }; +#endif diff --git a/src/test/lib/ApiTest.cpp b/src/test/lib/ApiTest.cpp index 93e24ef101..19a0543f4f 100644 --- a/src/test/lib/ApiTest.cpp +++ b/src/test/lib/ApiTest.cpp @@ -4521,6 +4521,7 @@ void QuicTest_QUIC_PARAM_CONN_ORIG_DEST_CID(MsQuicRegistration& Registration, Ms } } +#if defined(QUIC_API_ENABLE_PREVIEW_FEATURES) void QuicTest_QUIC_PARAM_CONN_ADD_LOCAL_ADDRESS(MsQuicRegistration& Registration, MsQuicConfiguration& ClientConfiguration) { TestScopeLogger LogScope0("QUIC_PARAM_CONN_ADD_LOCAL_ADDRESS"); @@ -4702,6 +4703,7 @@ void QuicTest_QUIC_PARAM_CONN_REMOVE_LOCAL_ADDRESS(MsQuicRegistration& Registrat } } } +#endif void QuicTestConnectionParam() { @@ -4736,8 +4738,10 @@ void QuicTestConnectionParam() QuicTest_QUIC_PARAM_CONN_STATISTICS_V2(Registration); QuicTest_QUIC_PARAM_CONN_STATISTICS_V2_PLAT(Registration); QuicTest_QUIC_PARAM_CONN_ORIG_DEST_CID(Registration, ClientConfiguration); +#if defined(QUIC_API_ENABLE_PREVIEW_FEATURES) QuicTest_QUIC_PARAM_CONN_ADD_LOCAL_ADDRESS(Registration, ClientConfiguration); QuicTest_QUIC_PARAM_CONN_REMOVE_LOCAL_ADDRESS(Registration, ClientConfiguration); +#endif } // diff --git a/src/test/lib/PathTest.cpp b/src/test/lib/PathTest.cpp index 2fdc31bd33..d9645b210c 100644 --- a/src/test/lib/PathTest.cpp +++ b/src/test/lib/PathTest.cpp @@ -120,6 +120,7 @@ QuicTestLocalPathChanges( } } +#if defined(QUIC_API_ENABLE_PREVIEW_FEATURES) void QuicTestProbePath( _In_ int Family, @@ -357,3 +358,4 @@ QuicTestMultipleLocalAddresses( TEST_TRUE(ProbeHelpers[2].ServerReceiveProbeEvent.WaitTimeout(TestWaitTimeout * 10)); TEST_TRUE(ProbeHelpers[2].ClientReceiveProbeEvent.WaitTimeout(TestWaitTimeout * 10)); } +#endif