Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
96a46367
Commit
96a46367
authored
Feb 06, 2006
by
Phil Lodwick
Committed by
Alexandre Julliard
Feb 06, 2006
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winsock/tests: select() conformance test improvements.
Add OK tests around more function calls. Add two more todo_wine tests that fail.
parent
38290cf9
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
30 additions
and
11 deletions
+30
-11
sock.c
dlls/winsock/tests/sock.c
+30
-11
No files found.
dlls/winsock/tests/sock.c
View file @
96a46367
...
...
@@ -1319,26 +1319,45 @@ static void test_WSAStringToAddressW(void)
static
void
test_select
(
void
)
{
SOCKET
fd
;
fd
=
socket
(
AF_INET
,
SOCK_STREAM
,
0
);
if
(
fd
!=
INVALID_SOCKET
)
{
fd_set
readfds
;
SOCKET
fdRead
,
fdWrite
;
fd_set
readfds
,
writefds
,
exceptfds
;
int
maxfd
;
int
ret
;
struct
timeval
select_timeout
;
fdRead
=
socket
(
AF_INET
,
SOCK_STREAM
,
0
);
ok
(
(
fdRead
!=
INVALID_SOCKET
),
"socket failed unexpectedly: %d
\n
"
,
WSAGetLastError
()
);
fdWrite
=
socket
(
AF_INET
,
SOCK_STREAM
,
0
);
ok
(
(
fdWrite
!=
INVALID_SOCKET
),
"socket failed unexpectedly: %d
\n
"
,
WSAGetLastError
()
);
FD_ZERO
(
&
readfds
);
FD_SET
(
fd
,
&
readfds
);
FD_ZERO
(
&
writefds
);
FD_ZERO
(
&
exceptfds
);
FD_SET
(
fdRead
,
&
readfds
);
FD_SET
(
fdWrite
,
&
writefds
);
FD_SET
(
fdRead
,
&
exceptfds
);
FD_SET
(
fdWrite
,
&
exceptfds
);
select_timeout
.
tv_sec
=
2
;
select_timeout
.
tv_usec
=
0
;
maxfd
=
fdRead
;
if
(
fdWrite
>
maxfd
)
maxfd
=
fdWrite
;
todo_wine
{
if
(
select
((
int
)
fd
+
1
,
&
readfds
,
NULL
,
NULL
,
&
select_timeout
)
!=
SOCKET_ERROR
)
ok
(
!
FD_ISSET
(
fd
,
&
readfds
),
"FD should not be set
\n
"
);
ret
=
select
(
maxfd
+
1
,
&
readfds
,
&
writefds
,
&
exceptfds
,
&
select_timeout
);
ok
(
(
ret
==
0
),
"select should not return any socket handles
\n
"
);
ok
(
!
FD_ISSET
(
fdRead
,
&
readfds
),
"FD should not be set
\n
"
);
ok
(
!
FD_ISSET
(
fdWrite
,
&
writefds
),
"FD should not be set
\n
"
);
}
closesocket
(
fd
);
}
ok
(
!
FD_ISSET
(
fdRead
,
&
exceptfds
),
"FD should not be set
\n
"
);
ok
(
!
FD_ISSET
(
fdWrite
,
&
exceptfds
),
"FD should not be set
\n
"
);
ret
=
closesocket
(
fdRead
);
ok
(
(
ret
==
0
),
"closesocket failed unexpectedly: %d
\n
"
,
ret
);
ret
=
closesocket
(
fdWrite
);
ok
(
(
ret
==
0
),
"closesocket failed unexpectedly: %d
\n
"
,
ret
);
}
/**************** Main program ***************/
...
...
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