Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
8ab7120b
Commit
8ab7120b
authored
Jul 22, 2023
by
Zebediah Figura
Committed by
Alexandre Julliard
Jul 24, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ws2_32/tests: Execute test_iocp() near the end.
Wine-Bug:
https://bugs.winehq.org//show_bug.cgi?id=54413
parent
ca02b8e4
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
25 additions
and
1 deletion
+25
-1
sock.c
dlls/ws2_32/tests/sock.c
+25
-1
No files found.
dlls/ws2_32/tests/sock.c
View file @
8ab7120b
...
...
@@ -13877,7 +13877,6 @@ START_TEST( sock )
test_WSARecv
();
test_WSAPoll
();
test_write_watch
();
test_iocp
();
test_events
();
...
...
@@ -13903,6 +13902,31 @@ START_TEST( sock )
test_connect_udp
();
test_tcp_sendto_recvfrom
();
/* There is apparently an obscure interaction between this test and
* test_WSAGetOverlappedResult().
*
* One thing this test does is to close socket handles through CloseHandle()
* and NtClose(), to prove that that is sufficient to cancel I/O on the
* socket. This has the obscure side effect that ws2_32.dll's internal
* per-process list of sockets never has that socket removed.
*
* test_WSAGetOverlappedResult() effectively proves that the per-process
* list of sockets exists, by calling DuplicateHandle() on a socket and then
* passing it to a function which cares about socket handle validity, which
* checks that handle against the internal list, finds it invalid, and
* returns WSAENOTSOCK.
*
* The problem is that if we close an NT handle without removing it from the
* ws2_32 list, then duplicate another handle, it *may* end up allocated to
* the same handle value, and thus re-validate that handle right under the
* nose of ws2_32. This causes the test_WSAGetOverlappedResult() test to
* sometimes succeed where it's expected to fail with ENOTSOCK.
*
* In order to avoid this, make sure that this test—which is evidently
* destructive to ws2_32 internal state in obscure ways—is executed last.
*/
test_iocp
();
/* this is an io heavy test, do it at the end so the kernel doesn't start dropping packets */
test_send
();
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment