[DeepTest] Add Comprehensive test suite for DataPath Winuser#5873
Draft
[DeepTest] Add Comprehensive test suite for DataPath Winuser#5873
Conversation
Add tests covering: - ECN send paths (IPv4 and IPv6) - DSCP send paths (IPv4 and IPv6) - IPv6 UDP send/receive - IPv6 server socket creation - UDP socket SHARE flag - MAX_THROUGHPUT send flag (enqueue path) - IPv6 TCP connect - TCP statistics query - TCP send/receive with data verification - UDP bind to specific port - Multiple sequential UDP sends - Feature query with different socket flags - Non-zero ClientRecvContextLength initialization - Segmented send data alloc and free - CxPlatRecvDataReturn(NULL) safety - Dual-stack server with IPv4 client - TCP connect/disconnect lifecycle - Large UDP payload send - DSCP recv socket option path (EnableDscpOnRecv) All 62 DataPath tests pass (40 existing + 22 new). Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Replace repetitive initialization/teardown code with RAII scope helper structs: DatapathScope, UdpSocketScope, SendDataScope, EventScope, and TcpSocketScope. Add static DefaultUdpCallbacks and DefaultTcpCallbacks constants to eliminate duplicated callback struct declarations. Refactored 37 tests using DatapathScope (UDP-only, UDP+TCP, and custom config variants), 26 uses of UdpSocketScope, 11 SendDataScope, 11 EventScope, and 7 TcpSocketScope instances. Tests using non-default UDP callbacks (DatapathTestUdpRecvCallback) or custom TCP callbacks retain manual init/uninit to preserve correct cleanup ordering. All 74 test functions preserved with unchanged signatures, assertions, and test logic. File reduced from 4130 to 3503 lines. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
- Increase TcpTestScope destructor sleep from 200ms to 500ms to allow async IO completion on slow CI machines - Increase TcpSendRecv manual cleanup sleep from 200ms to 500ms - Add null check in GetListenerPort() to prevent crash if listener creation fails (TEST_QUIC_SUCCEEDED returns from helper, not caller) Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This pull request adds a comprehensive suite of DataPath WinUser test declarations and ensures the new test source file is included in the build process. The main focus is on expanding test coverage for DataPath functionality by introducing a large number of new test function prototypes and registering the new test file with CMake.
DataPath WinUser Test Additions:
MsQuicTests.h. These cover various edge cases and configurations for DataPath functionality.Build System Update:
DatapathWinUserTest.cppfile in thesrc/test/lib/CMakeLists.txtto ensure these tests are compiled and included in the test suite.