Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
wine
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Package registry
Container registry
Model registry
Operate
Terraform modules
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Lorenzo Ferrillo
wine
Commits
23a785af
Commit
23a785af
authored
12 years ago
by
Erich Hoover
Committed by
Alexandre Julliard
12 years ago
Browse files
Options
Downloads
Patches
Plain Diff
ws2_32/tests: Test for AcceptEx IOCP behavior for cancelled sockets.
parent
1e0b65f3
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
dlls/ws2_32/tests/sock.c
+43
-0
43 additions, 0 deletions
dlls/ws2_32/tests/sock.c
with
43 additions
and
0 deletions
dlls/ws2_32/tests/sock.c
+
43
−
0
View file @
23a785af
...
...
@@ -5510,6 +5510,49 @@ static void test_completion_port(void)
ok
(
num_bytes
==
0xdeadbeef
,
"Number of bytes transferred is %u
\n
"
,
num_bytes
);
ok
(
!
olp
,
"Overlapped structure is at %p
\n
"
,
olp
);
/* Test IOCP response on socket close (IOCP created before AcceptEx) */
if
((
src
=
setup_iocp_src
(
&
bindAddress
))
==
INVALID_SOCKET
)
goto
end
;
SetLastError
(
0xdeadbeef
);
io_port
=
CreateIoCompletionPort
((
HANDLE
)
src
,
previous_port
,
125
,
0
);
ok
(
io_port
!=
NULL
,
"failed to create completion port %u
\n
"
,
GetLastError
());
bret
=
pAcceptEx
(
src
,
dest
,
buf
,
sizeof
(
buf
)
-
2
*
(
sizeof
(
struct
sockaddr_in
)
+
16
),
sizeof
(
struct
sockaddr_in
)
+
16
,
sizeof
(
struct
sockaddr_in
)
+
16
,
&
num_bytes
,
&
ov
);
ok
(
bret
==
FALSE
,
"AcceptEx returned %d
\n
"
,
bret
);
ok
(
GetLastError
()
==
ERROR_IO_PENDING
,
"Last error was %d
\n
"
,
GetLastError
());
closesocket
(
src
);
src
=
INVALID_SOCKET
;
SetLastError
(
0xdeadbeef
);
key
=
0xdeadbeef
;
num_bytes
=
0xdeadbeef
;
olp
=
(
WSAOVERLAPPED
*
)
0xdeadbeef
;
bret
=
GetQueuedCompletionStatus
(
io_port
,
&
num_bytes
,
&
key
,
&
olp
,
100
);
ok
(
bret
==
FALSE
,
"failed to get completion status %u
\n
"
,
bret
);
todo_wine
ok
(
GetLastError
()
==
ERROR_OPERATION_ABORTED
,
"Last error was %d
\n
"
,
GetLastError
());
todo_wine
ok
(
key
==
125
,
"Key is %lu
\n
"
,
key
);
todo_wine
ok
(
num_bytes
==
0
,
"Number of bytes transferred is %u
\n
"
,
num_bytes
);
todo_wine
ok
(
olp
==
&
ov
,
"Overlapped structure is at %p
\n
"
,
olp
);
todo_wine
ok
(
olp
&&
(
olp
->
Internal
==
(
ULONG
)
STATUS_CANCELLED
),
"Internal status is %lx
\n
"
,
olp
?
olp
->
Internal
:
0
);
SetLastError
(
0xdeadbeef
);
key
=
0xdeadbeef
;
num_bytes
=
0xdeadbeef
;
olp
=
(
WSAOVERLAPPED
*
)
0xdeadbeef
;
bret
=
GetQueuedCompletionStatus
(
io_port
,
&
num_bytes
,
&
key
,
&
olp
,
200
);
ok
(
bret
==
FALSE
,
"failed to get completion status %u
\n
"
,
bret
);
ok
(
GetLastError
()
==
WAIT_TIMEOUT
,
"Last error was %d
\n
"
,
GetLastError
());
ok
(
key
==
0xdeadbeef
,
"Key is %lu
\n
"
,
key
);
ok
(
num_bytes
==
0xdeadbeef
,
"Number of bytes transferred is %u
\n
"
,
num_bytes
);
ok
(
!
olp
,
"Overlapped structure is at %p
\n
"
,
olp
);
/* */
if
((
src
=
setup_iocp_src
(
&
bindAddress
))
==
INVALID_SOCKET
)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment