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
04154074
Commit
04154074
authored
Mar 12, 2015
by
Bruno Jesus
Committed by
Alexandre Julliard
Mar 13, 2015
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ws2_32/tests: Add more select() tests related to OOB handling.
parent
f1e23aa6
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
23 additions
and
1 deletion
+23
-1
sock.c
dlls/ws2_32/tests/sock.c
+23
-1
No files found.
dlls/ws2_32/tests/sock.c
View file @
04154074
...
...
@@ -3614,7 +3614,7 @@ static void test_select(void)
/* When OOB data is received the socket is set in the except descriptor */
ret
=
send
(
fdWrite
,
"A"
,
1
,
MSG_OOB
);
ok
(
ret
==
1
,
"expected
4
, got %d
\n
"
,
ret
);
ok
(
ret
==
1
,
"expected
1
, got %d
\n
"
,
ret
);
FD_ZERO_ALL
();
FD_SET_ALL
(
fdListen
);
FD_SET
(
fdRead
,
&
readfds
);
...
...
@@ -3629,6 +3629,28 @@ todo_wine
ok
(
ret
==
1
,
"expected 1, got %d
\n
"
,
ret
);
ok
(
tmp_buf
[
0
]
==
'A'
,
"expected 'A', got 0x%02X
\n
"
,
tmp_buf
[
0
]);
/* If the socket is OOBINLINED it will not receive the OOB in except fds */
ret
=
1
;
ret
=
setsockopt
(
fdRead
,
SOL_SOCKET
,
SO_OOBINLINE
,
(
char
*
)
&
ret
,
sizeof
(
ret
));
ok
(
ret
==
0
,
"expected 0, got %d
\n
"
,
ret
);
ret
=
send
(
fdWrite
,
"A"
,
1
,
MSG_OOB
);
ok
(
ret
==
1
,
"expected 1, got %d
\n
"
,
ret
);
FD_ZERO_ALL
();
FD_SET_ALL
(
fdListen
);
FD_SET
(
fdRead
,
&
readfds
);
FD_SET
(
fdRead
,
&
exceptfds
);
ret
=
select
(
0
,
&
readfds
,
&
writefds
,
&
exceptfds
,
&
select_timeout
);
ok
(
ret
==
1
,
"expected 1, got %d
\n
"
,
ret
);
ok
(
FD_ISSET
(
fdRead
,
&
readfds
),
"fdRead socket is not in the set
\n
"
);
tmp_buf
[
0
]
=
0xAF
;
SetLastError
(
0xdeadbeef
);
ret
=
recv
(
fdRead
,
tmp_buf
,
sizeof
(
tmp_buf
),
MSG_OOB
);
ok
(
ret
==
SOCKET_ERROR
,
"expected -1, got %d
\n
"
,
ret
);
/* can't recv with MSG_OOB if OOBINLINED */
ok
(
GetLastError
()
==
WSAEINVAL
,
"expected 10022, got %d
\n
"
,
GetLastError
());
ret
=
recv
(
fdRead
,
tmp_buf
,
sizeof
(
tmp_buf
),
0
);
ok
(
ret
==
1
,
"expected 1, got %d
\n
"
,
ret
);
ok
(
tmp_buf
[
0
]
==
'A'
,
"expected 'A', got 0x%02X
\n
"
,
tmp_buf
[
0
]);
/* When the connection is closed the socket is set in the read descriptor */
ret
=
closesocket
(
fdRead
);
ok
(
ret
==
0
,
"expected 0, got %d
\n
"
,
ret
);
...
...
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