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
131f9135
Commit
131f9135
authored
Jan 05, 2022
by
Zebediah Figura
Committed by
Alexandre Julliard
Jan 06, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ws2_32/tests: Test whether WSAEventSelect() modifies the event state.
Signed-off-by:
Zebediah Figura
<
zfigura@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
f9f4ee1b
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
36 additions
and
0 deletions
+36
-0
sock.c
dlls/ws2_32/tests/sock.c
+36
-0
No files found.
dlls/ws2_32/tests/sock.c
View file @
131f9135
...
...
@@ -5133,6 +5133,42 @@ static void test_accept_events(struct event_test_ctx *ctx)
closesocket
(
server
);
closesocket
(
client
);
/* As above, but select on a subset containing FD_ACCEPT first. */
if
(
!
ctx
->
is_message
)
{
select_events
(
ctx
,
listener
,
FD_CONNECT
|
FD_READ
|
FD_OOB
|
FD_ACCEPT
);
client
=
socket
(
AF_INET
,
SOCK_STREAM
,
IPPROTO_TCP
);
ok
(
client
!=
-
1
,
"failed to create socket, error %u
\n
"
,
WSAGetLastError
());
ret
=
connect
(
client
,
(
struct
sockaddr
*
)
&
destaddr
,
sizeof
(
destaddr
));
ok
(
!
ret
,
"failed to connect, error %u
\n
"
,
WSAGetLastError
());
ret
=
WaitForSingleObject
(
ctx
->
event
,
200
);
ok
(
!
ret
,
"wait timed out
\n
"
);
select_events
(
ctx
,
listener
,
FD_CONNECT
|
FD_READ
|
FD_OOB
);
ret
=
WaitForSingleObject
(
ctx
->
event
,
0
);
ok
(
!
ret
,
"wait timed out
\n
"
);
ResetEvent
(
ctx
->
event
);
select_events
(
ctx
,
listener
,
FD_CONNECT
|
FD_READ
|
FD_OOB
);
ret
=
WaitForSingleObject
(
ctx
->
event
,
0
);
ok
(
ret
==
WAIT_TIMEOUT
,
"expected timeout
\n
"
);
select_events
(
ctx
,
listener
,
FD_CONNECT
|
FD_READ
|
FD_OOB
|
FD_ACCEPT
);
ret
=
WaitForSingleObject
(
ctx
->
event
,
0
);
todo_wine
ok
(
!
ret
,
"wait timed out
\n
"
);
if
(
!
ret
)
check_events
(
ctx
,
FD_ACCEPT
,
0
,
0
);
server
=
accept
(
listener
,
NULL
,
NULL
);
ok
(
server
!=
-
1
,
"failed to accept, error %u
\n
"
,
WSAGetLastError
());
closesocket
(
server
);
closesocket
(
client
);
}
/* As above, but select on a subset not containing FD_ACCEPT first. */
select_events
(
ctx
,
listener
,
FD_CONNECT
|
FD_READ
|
FD_OOB
);
...
...
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