Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-fonts
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
Aleksandr Isakov
wine-fonts
Commits
f792b082
Commit
f792b082
authored
May 29, 2022
by
Zebediah Figura
Committed by
Alexandre Julliard
Jul 19, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ws2_32/tests: Test FD_CONNECT with UDP sockets.
parent
913a96d7
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
28 additions
and
1 deletion
+28
-1
sock.c
dlls/ws2_32/tests/sock.c
+28
-1
No files found.
dlls/ws2_32/tests/sock.c
View file @
f792b082
...
...
@@ -5878,7 +5878,7 @@ static void test_connect_events(struct event_test_ctx *ctx)
check_events
(
ctx
,
FD_WRITE
,
0
,
200
);
select_events
(
ctx
,
client
,
FD_ACCEPT
|
FD_C
LOSE
|
FD_C
ONNECT
|
FD_OOB
|
FD_READ
|
FD_WRITE
);
select_events
(
ctx
,
client
,
FD_ACCEPT
|
FD_CONNECT
|
FD_OOB
|
FD_READ
|
FD_WRITE
);
if
(
ctx
->
is_message
)
check_events
(
ctx
,
FD_WRITE
,
0
,
200
);
...
...
@@ -5888,6 +5888,33 @@ static void test_connect_events(struct event_test_ctx *ctx)
closesocket
(
client
);
closesocket
(
server
);
/* Test with UDP sockets. */
client
=
socket
(
AF_INET
,
SOCK_DGRAM
,
IPPROTO_UDP
);
server
=
socket
(
AF_INET
,
SOCK_DGRAM
,
IPPROTO_UDP
);
select_events
(
ctx
,
client
,
FD_ACCEPT
|
FD_CONNECT
|
FD_OOB
|
FD_READ
|
FD_WRITE
);
if
(
ctx
->
is_message
)
check_events
(
ctx
,
FD_WRITE
,
0
,
200
);
check_events_todo_event
(
ctx
,
0
,
0
,
0
);
ret
=
bind
(
server
,
(
const
struct
sockaddr
*
)
&
addr
,
sizeof
(
addr
));
ok
(
!
ret
,
"failed to bind, error %u
\n
"
,
WSAGetLastError
());
len
=
sizeof
(
destaddr
);
ret
=
getsockname
(
server
,
(
struct
sockaddr
*
)
&
destaddr
,
&
len
);
ok
(
!
ret
,
"failed to get address, error %u
\n
"
,
WSAGetLastError
());
ret
=
connect
(
client
,
(
struct
sockaddr
*
)
&
addr
,
sizeof
(
addr
));
ok
(
!
ret
,
"got error %lu
\n
"
,
GetLastError
());
if
(
ctx
->
is_message
)
check_events_todo
(
ctx
,
FD_WRITE
,
0
,
200
);
else
check_events_todo
(
ctx
,
FD_CONNECT
,
FD_WRITE
,
200
);
check_events
(
ctx
,
0
,
0
,
0
);
closesocket
(
client
);
closesocket
(
server
);
closesocket
(
listener
);
}
...
...
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