Skip to content

Commit

Permalink
test code sanity check
Browse files Browse the repository at this point in the history
  • Loading branch information
ProjectsByJackHe committed Feb 7, 2025
1 parent 63a4f6f commit 4312eea
Show file tree
Hide file tree
Showing 5 changed files with 55 additions and 55 deletions.
2 changes: 1 addition & 1 deletion src/perf/lib/PerfClient.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -442,7 +442,7 @@ PerfClient::Wait(
}

if (GetConnectedConnections() == 0) {
WriteOutput("Error: No Successful Connections!\n");
WriteOutput("Error: Nooooooooooooooooo!\n");
return QUIC_STATUS_CONNECTION_REFUSED;
}

Expand Down
80 changes: 40 additions & 40 deletions src/test/bin/quic_gtest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1559,14 +1559,14 @@ TEST_P(WithFamilyArgs, ClientBlockedSourcePort) {

#if QUIC_TEST_DATAPATH_HOOKS_ENABLED
TEST_P(WithFamilyArgs, RebindPort) {
// #if defined(QUIC_API_ENABLE_PREVIEW_FEATURES)
// if (UseQTIP) {
// //
// // NAT rebind doesn't make sense for TCP and QTIP.
// //
// return;
// }
// #endif
#if defined(QUIC_API_ENABLE_PREVIEW_FEATURES)
if (UseQTIP) {
//
// NAT rebind doesn't make sense for TCP and QTIP.
//
return;
}
#endif
TestLoggerT<ParamType> Logger("QuicTestNatPortRebind", GetParam());
if (TestingKernelMode) {
QUIC_RUN_REBIND_PARAMS Params = {
Expand All @@ -1580,14 +1580,14 @@ TEST_P(WithFamilyArgs, RebindPort) {
}

TEST_P(WithRebindPaddingArgs, RebindPortPadded) {
// #if defined(QUIC_API_ENABLE_PREVIEW_FEATURES)
// if (UseQTIP) {
// //
// // NAT rebind doesn't make sense for TCP and QTIP.
// //
// return;
// }
// #endif
#if defined(QUIC_API_ENABLE_PREVIEW_FEATURES)
if (UseQTIP) {
//
// NAT rebind doesn't make sense for TCP and QTIP.
//
return;
}
#endif
TestLoggerT<ParamType> Logger("QuicTestNatPortRebind(pad)", GetParam());
if (TestingKernelMode) {
QUIC_RUN_REBIND_PARAMS Params = {
Expand All @@ -1601,14 +1601,14 @@ TEST_P(WithRebindPaddingArgs, RebindPortPadded) {
}

TEST_P(WithFamilyArgs, RebindAddr) {
// #if defined(QUIC_API_ENABLE_PREVIEW_FEATURES)
// if (UseQTIP) {
// //
// // NAT rebind doesn't make sense for TCP and QTIP.
// //
// return;
// }
// #endif
#if defined(QUIC_API_ENABLE_PREVIEW_FEATURES)
if (UseQTIP) {
//
// NAT rebind doesn't make sense for TCP and QTIP.
//
return;
}
#endif
TestLoggerT<ParamType> Logger("QuicTestNatAddrRebind", GetParam());
if (TestingKernelMode) {
QUIC_RUN_REBIND_PARAMS Params = {
Expand All @@ -1623,7 +1623,7 @@ TEST_P(WithFamilyArgs, RebindAddr) {

TEST_P(WithFamilyArgs, RebindDatapathAddr) {
#if defined(QUIC_API_ENABLE_PREVIEW_FEATURES)
if (!UseDuoNic) { // OLD: (UseQTIP || !UseDuoNic)
if (UseQTIP || !UseDuoNic) {
//
// NAT rebind doesn't make sense for TCP and QTIP.
//
Expand All @@ -1637,14 +1637,14 @@ TEST_P(WithFamilyArgs, RebindDatapathAddr) {
}

TEST_P(WithRebindPaddingArgs, RebindAddrPadded) {
// #if defined(QUIC_API_ENABLE_PREVIEW_FEATURES)
// if (UseQTIP) {
// //
// // NAT rebind doesn't make sense for TCP and QTIP.
// //
// return;
// }
// #endif
#if defined(QUIC_API_ENABLE_PREVIEW_FEATURES)
if (UseQTIP) {
//
// NAT rebind doesn't make sense for TCP and QTIP.
//
return;
}
#endif
TestLoggerT<ParamType> Logger("QuicTestNatAddrRebind(pad)", GetParam());
if (TestingKernelMode) {
QUIC_RUN_REBIND_PARAMS Params = {
Expand Down Expand Up @@ -1833,13 +1833,13 @@ TEST_P(WithSendArgs3, SendIntermittently) {

TEST_P(WithSend0RttArgs1, Send0Rtt) {
#if defined(QUIC_API_ENABLE_PREVIEW_FEATURES)
// if (UseQTIP) {
// //
// // QTIP doesn't work with 0-RTT. QTIP only pauses and caches 1 packet during
// // TCP handshake.
// //
// return;
// }
if (UseQTIP) {
//
// QTIP doesn't work with 0-RTT. QTIP only pauses and caches 1 packet during
// TCP handshake.
//
return;
}
#endif

TestLoggerT<ParamType> Logger("Send0Rtt", GetParam());
Expand Down
10 changes: 5 additions & 5 deletions src/test/bin/quic_gtest.h
Original file line number Diff line number Diff line change
Expand Up @@ -415,11 +415,11 @@ struct SendArgs2 {
for (bool UseZeroRtt : { false })
#endif
{
// #if defined(QUIC_API_ENABLE_PREVIEW_FEATURES)
// if (UseQTIP && UseZeroRtt) {
// continue;
// }
// #endif
#if defined(QUIC_API_ENABLE_PREVIEW_FEATURES)
if (UseQTIP && UseZeroRtt) {
continue;
}
#endif
list.push_back({ Family, UseSendBuffer, UseZeroRtt });
}
return list;
Expand Down
6 changes: 3 additions & 3 deletions src/test/lib/ApiTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2607,9 +2607,9 @@ void QuicTestGlobalParam()
SimpleGetParamTest(nullptr, QUIC_PARAM_GLOBAL_EXECUTION_CONFIG, DataLength, Data);
}

// #if defined(QUIC_API_ENABLE_PREVIEW_FEATURES)
// if (!UseQTIP && !UseDuoNic)
// #endif
#if defined(QUIC_API_ENABLE_PREVIEW_FEATURES)
if (!UseQTIP && !UseDuoNic)
#endif
{
//
// Good GetParam with length == 0
Expand Down
12 changes: 6 additions & 6 deletions src/test/lib/DataTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -507,9 +507,9 @@ QuicTestConnectAndPing(
TEST_QUIC_SUCCEEDED(Connections.get()[i]->SetRemoteAddr(RemoteAddr));

if (i != 0
// #if defined(QUIC_API_ENABLE_PREVIEW_FEATURES)
// && !UseQTIP
// #endif
#if defined(QUIC_API_ENABLE_PREVIEW_FEATURES)
&& !UseQTIP
#endif
) {
Connections.get()[i]->SetLocalAddr(LocalAddr);
}
Expand All @@ -522,9 +522,9 @@ QuicTestConnectAndPing(
ServerLocalAddr.GetPort()));

if (i == 0
// #if defined(QUIC_API_ENABLE_PREVIEW_FEATURES)
// && !UseQTIP
// #endif
#if defined(QUIC_API_ENABLE_PREVIEW_FEATURES)
&& !UseQTIP
#endif
) {
Connections.get()[i]->GetLocalAddr(LocalAddr);
}
Expand Down

0 comments on commit 4312eea

Please sign in to comment.