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
18b3f4ca
Commit
18b3f4ca
authored
Mar 10, 2015
by
Bruno Jesus
Committed by
Alexandre Julliard
Mar 11, 2015
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ws2_32/tests: Test the behavior of reading data from an OOBINLINE'd socket.
parent
beff4323
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
35 additions
and
1 deletion
+35
-1
sock.c
dlls/ws2_32/tests/sock.c
+35
-1
No files found.
dlls/ws2_32/tests/sock.c
View file @
18b3f4ca
...
...
@@ -4450,7 +4450,9 @@ static void test_ioctlsocket(void)
struct
tcp_keepalive
kalive
;
int
ret
,
optval
;
static
const
LONG
cmds
[]
=
{
FIONBIO
,
FIONREAD
,
SIOCATMARK
};
UINT
i
;
UINT
i
,
bytes_rec
;
char
data
;
WSABUF
bufs
;
u_long
arg
=
0
;
sock
=
socket
(
AF_INET
,
SOCK_STREAM
,
IPPROTO_TCP
);
...
...
@@ -4551,6 +4553,38 @@ static void test_ioctlsocket(void)
ok
(
ret
==
0
,
"WSAIoctl failed unexpectedly with error %d
\n
"
,
WSAGetLastError
());
ok
(
optval
==
4
,
"FIONREAD should have returned 4 bytes, got %d instead
\n
"
,
optval
);
/* trying to read from an OOB inlined socket with MSG_OOB results in WSAEINVAL */
set_blocking
(
dst
,
FALSE
);
i
=
MSG_OOB
;
SetLastError
(
0xdeadbeef
);
ret
=
recv
(
dst
,
&
data
,
1
,
i
);
ok
(
ret
==
SOCKET_ERROR
,
"expected -1, got %d
\n
"
,
ret
);
ret
=
GetLastError
();
todo_wine
ok
(
ret
==
WSAEWOULDBLOCK
,
"expected 10035, got %d
\n
"
,
ret
);
bufs
.
len
=
sizeof
(
char
);
bufs
.
buf
=
&
data
;
ret
=
WSARecv
(
dst
,
&
bufs
,
1
,
&
bytes_rec
,
&
i
,
NULL
,
NULL
);
ok
(
ret
==
SOCKET_ERROR
,
"expected -1, got %d
\n
"
,
ret
);
ret
=
GetLastError
();
todo_wine
ok
(
ret
==
WSAEWOULDBLOCK
,
"expected 10035, got %d
\n
"
,
ret
);
optval
=
1
;
ret
=
setsockopt
(
dst
,
SOL_SOCKET
,
SO_OOBINLINE
,
(
void
*
)
&
optval
,
sizeof
(
optval
));
ok
(
ret
!=
SOCKET_ERROR
,
"setsockopt failed unexpectedly
\n
"
);
i
=
MSG_OOB
;
SetLastError
(
0xdeadbeef
);
ret
=
recv
(
dst
,
&
data
,
1
,
i
);
ok
(
ret
==
SOCKET_ERROR
,
"expected -1, got %d
\n
"
,
ret
);
ret
=
GetLastError
();
ok
(
ret
==
WSAEINVAL
,
"expected 10022, got %d
\n
"
,
ret
);
bufs
.
len
=
sizeof
(
char
);
bufs
.
buf
=
&
data
;
ret
=
WSARecv
(
dst
,
&
bufs
,
1
,
&
bytes_rec
,
&
i
,
NULL
,
NULL
);
ok
(
ret
==
SOCKET_ERROR
,
"expected -1, got %d
\n
"
,
ret
);
ret
=
GetLastError
();
ok
(
ret
==
WSAEINVAL
,
"expected 10022, got %d
\n
"
,
ret
);
closesocket
(
dst
);
optval
=
0xdeadbeef
;
ret
=
WSAIoctl
(
dst
,
FIONREAD
,
NULL
,
0
,
&
optval
,
sizeof
(
optval
),
&
arg
,
NULL
,
NULL
);
...
...
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