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
7a8d4304
Commit
7a8d4304
authored
Feb 05, 2014
by
Bruno Jesus
Committed by
Alexandre Julliard
Feb 05, 2014
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ws2_32/tests: Fix AcceptEx tests related to address length.
parent
7f973392
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
35 additions
and
21 deletions
+35
-21
sock.c
dlls/ws2_32/tests/sock.c
+35
-21
No files found.
dlls/ws2_32/tests/sock.c
View file @
7a8d4304
...
...
@@ -5919,10 +5919,24 @@ static void test_AcceptEx(void)
ok
(
bret
==
FALSE
&&
WSAGetLastError
()
==
WSAENOTSOCK
,
"AcceptEx on invalid listening socket "
"returned %d + errno %d
\n
"
,
bret
,
WSAGetLastError
());
bret
=
pAcceptEx
(
listener
,
acceptor
,
buffer
,
sizeof
(
buffer
)
-
2
*
(
sizeof
(
struct
sockaddr_in
)
+
16
),
sizeof
(
struct
sockaddr_in
)
+
16
,
sizeof
(
struct
sockaddr_in
)
+
16
,
&
bytesReturned
,
&
overlapped
);
todo_wine
ok
(
bret
==
FALSE
&&
WSAGetLastError
()
==
WSAEINVAL
,
"AcceptEx on a non-listening socket "
"returned %d + errno %d
\n
"
,
bret
,
WSAGetLastError
());
iret
=
listen
(
listener
,
5
);
if
(
iret
!=
0
)
{
skip
(
"listening failed, errno = %d
\n
"
,
WSAGetLastError
());
goto
end
;
}
bret
=
pAcceptEx
(
listener
,
INVALID_SOCKET
,
buffer
,
sizeof
(
buffer
)
-
2
*
(
sizeof
(
struct
sockaddr_in
)
+
16
),
sizeof
(
struct
sockaddr_in
)
+
16
,
sizeof
(
struct
sockaddr_in
)
+
16
,
&
bytesReturned
,
&
overlapped
);
ok
(
bret
==
FALSE
&&
WSAGetLastError
()
==
WSAEINVAL
,
"AcceptEx on invalid accepting socket "
todo_wine
ok
(
bret
==
FALSE
&&
WSAGetLastError
()
==
WSAENOTSOCK
,
"AcceptEx on invalid listening socket "
"returned %d + errno %d
\n
"
,
bret
,
WSAGetLastError
());
bret
=
pAcceptEx
(
listener
,
acceptor
,
NULL
,
sizeof
(
buffer
)
-
2
*
(
sizeof
(
struct
sockaddr_in
)
+
16
),
...
...
@@ -5935,23 +5949,35 @@ static void test_AcceptEx(void)
bret
=
pAcceptEx
(
listener
,
acceptor
,
buffer
,
0
,
0
,
sizeof
(
struct
sockaddr_in
)
+
16
,
&
bytesReturned
,
&
overlapped
);
ok
(
bret
==
FALSE
&&
WSAGetLastError
()
==
WSAEINVAL
,
"AcceptEx on too small local address size "
"returned %d + errno %d
\n
"
,
bret
,
WSAGetLastError
());
todo_wine
ok
(
bret
==
FALSE
&&
(
WSAGetLastError
()
==
ERROR_IO_PENDING
||
broken
(
WSAGetLastError
()
==
WSAEINVAL
))
/* NT4 */
,
"AcceptEx on too small local address size returned %d + errno %d
\n
"
,
bret
,
WSAGetLastError
());
bret
=
CancelIo
((
HANDLE
)
listener
);
ok
(
bret
,
"Failed to cancel pending accept socket
\n
"
);
bret
=
pAcceptEx
(
listener
,
acceptor
,
buffer
,
0
,
sizeof
(
struct
sockaddr_in
)
+
15
,
sizeof
(
struct
sockaddr_in
)
+
16
,
&
bytesReturned
,
&
overlapped
);
ok
(
bret
==
FALSE
&&
WSAGetLastError
()
==
WSAEINVAL
,
"AcceptEx on too small local address size "
"returned %d + errno %d
\n
"
,
bret
,
WSAGetLastError
());
todo_wine
ok
(
bret
==
FALSE
&&
WSAGetLastError
()
==
ERROR_IO_PENDING
,
"AcceptEx on too small local address "
"size returned %d + errno %d
\n
"
,
bret
,
WSAGetLastError
());
bret
=
CancelIo
((
HANDLE
)
listener
);
ok
(
bret
,
"Failed to cancel pending accept socket
\n
"
);
bret
=
pAcceptEx
(
listener
,
acceptor
,
buffer
,
0
,
sizeof
(
struct
sockaddr_in
)
+
16
,
0
,
&
bytesReturned
,
&
overlapped
);
ok
(
bret
==
FALSE
&&
WSAGetLastError
()
==
WSAEINVAL
,
"AcceptEx on too small remote address size "
"returned %d + errno %d
\n
"
,
bret
,
WSAGetLastError
());
todo_wine
ok
(
bret
==
FALSE
&&
(
WSAGetLastError
()
==
WSAEFAULT
||
broken
(
WSAGetLastError
()
==
WSAEINVAL
))
/* NT4 */
,
"AcceptEx on too small remote address size returned %d + errno %d
\n
"
,
bret
,
WSAGetLastError
());
bret
=
pAcceptEx
(
listener
,
acceptor
,
buffer
,
0
,
sizeof
(
struct
sockaddr_in
)
+
16
,
sizeof
(
struct
sockaddr_in
)
+
15
,
&
bytesReturned
,
&
overlapped
);
ok
(
bret
==
FALSE
&&
WSAGetLastError
()
==
WSAEINVAL
,
"AcceptEx on too small remote address size "
"returned %d + errno %d
\n
"
,
bret
,
WSAGetLastError
());
todo_wine
ok
(
bret
==
FALSE
&&
(
WSAGetLastError
()
==
ERROR_IO_PENDING
||
broken
(
WSAGetLastError
()
==
WSAEINVAL
))
/* NT4 */
,
"AcceptEx on too small remote address size returned %d + errno %d
\n
"
,
bret
,
WSAGetLastError
());
bret
=
CancelIo
((
HANDLE
)
listener
);
ok
(
bret
,
"Failed to cancel pending accept socket
\n
"
);
bret
=
pAcceptEx
(
listener
,
acceptor
,
buffer
,
0
,
sizeof
(
struct
sockaddr_in
)
+
16
,
sizeof
(
struct
sockaddr_in
)
+
16
,
...
...
@@ -5963,18 +5989,6 @@ static void test_AcceptEx(void)
ok
(
bret
==
FALSE
&&
WSAGetLastError
()
==
ERROR_INVALID_PARAMETER
,
"AcceptEx on a NULL overlapped "
"returned %d + errno %d
\n
"
,
bret
,
WSAGetLastError
());
bret
=
pAcceptEx
(
listener
,
acceptor
,
buffer
,
sizeof
(
buffer
)
-
2
*
(
sizeof
(
struct
sockaddr_in
)
+
16
),
sizeof
(
struct
sockaddr_in
)
+
16
,
sizeof
(
struct
sockaddr_in
)
+
16
,
&
bytesReturned
,
&
overlapped
);
todo_wine
ok
(
bret
==
FALSE
&&
WSAGetLastError
()
==
WSAEINVAL
,
"AcceptEx on a non-listening socket "
"returned %d + errno %d
\n
"
,
bret
,
WSAGetLastError
());
iret
=
listen
(
listener
,
5
);
if
(
iret
!=
0
)
{
skip
(
"listening failed, errno = %d
\n
"
,
WSAGetLastError
());
goto
end
;
}
overlapped
.
hEvent
=
CreateEventA
(
NULL
,
FALSE
,
FALSE
,
NULL
);
if
(
overlapped
.
hEvent
==
NULL
)
{
skip
(
"could not create event object, errno = %d
\n
"
,
GetLastError
());
...
...
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