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
a563d670
Commit
a563d670
authored
Aug 24, 2009
by
Detlef Riekenberg
Committed by
Alexandre Julliard
Aug 25, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ws2_32/tests: Add tests for getsockopt with invalid levels.
parent
3d326eb5
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
37 additions
and
0 deletions
+37
-0
sock.c
dlls/ws2_32/tests/sock.c
+37
-0
No files found.
dlls/ws2_32/tests/sock.c
View file @
a563d670
...
...
@@ -2042,6 +2042,43 @@ static void test_extendedSocketOptions(void)
ok
((
optval
==
65507
)
||
(
optval
==
65527
),
"SO_MAX_MSG_SIZE reported %d, expected 65507 or 65527
\n
"
,
optval
);
/* IE 3 use 0xffffffff instead of SOL_SOCKET (0xffff) */
SetLastError
(
0xdeadbeef
);
optval
=
0xdeadbeef
;
ret
=
getsockopt
(
sock
,
0xffffffff
,
SO_MAX_MSG_SIZE
,
(
char
*
)
&
optval
,
&
optlen
);
ok
(
(
ret
==
SOCKET_ERROR
)
&&
(
WSAGetLastError
()
==
WSAEINVAL
),
"got %d with %d and optval: 0x%x/%d (expected SOCKET_ERROR with WSAEINVAL)
\n
"
,
ret
,
WSAGetLastError
(),
optval
,
optval
);
/* more invalid values for level */
SetLastError
(
0xdeadbeef
);
optval
=
0xdeadbeef
;
ret
=
getsockopt
(
sock
,
0x1234ffff
,
SO_MAX_MSG_SIZE
,
(
char
*
)
&
optval
,
&
optlen
);
ok
(
(
ret
==
SOCKET_ERROR
)
&&
(
WSAGetLastError
()
==
WSAEINVAL
),
"got %d with %d and optval: 0x%x/%d (expected SOCKET_ERROR with WSAEINVAL)
\n
"
,
ret
,
WSAGetLastError
(),
optval
,
optval
);
SetLastError
(
0xdeadbeef
);
optval
=
0xdeadbeef
;
ret
=
getsockopt
(
sock
,
0x8000ffff
,
SO_MAX_MSG_SIZE
,
(
char
*
)
&
optval
,
&
optlen
);
ok
(
(
ret
==
SOCKET_ERROR
)
&&
(
WSAGetLastError
()
==
WSAEINVAL
),
"got %d with %d and optval: 0x%x/%d (expected SOCKET_ERROR with WSAEINVAL)
\n
"
,
ret
,
WSAGetLastError
(),
optval
,
optval
);
SetLastError
(
0xdeadbeef
);
optval
=
0xdeadbeef
;
ret
=
getsockopt
(
sock
,
0x00008000
,
SO_MAX_MSG_SIZE
,
(
char
*
)
&
optval
,
&
optlen
);
ok
(
(
ret
==
SOCKET_ERROR
)
&&
(
WSAGetLastError
()
==
WSAEINVAL
),
"got %d with %d and optval: 0x%x/%d (expected SOCKET_ERROR with WSAEINVAL)
\n
"
,
ret
,
WSAGetLastError
(),
optval
,
optval
);
SetLastError
(
0xdeadbeef
);
optval
=
0xdeadbeef
;
ret
=
getsockopt
(
sock
,
0x00000800
,
SO_MAX_MSG_SIZE
,
(
char
*
)
&
optval
,
&
optlen
);
ok
(
(
ret
==
SOCKET_ERROR
)
&&
(
WSAGetLastError
()
==
WSAEINVAL
),
"got %d with %d and optval: 0x%x/%d (expected SOCKET_ERROR with WSAEINVAL)
\n
"
,
ret
,
WSAGetLastError
(),
optval
,
optval
);
optlen
=
sizeof
(
LINGER
);
ret
=
getsockopt
(
sock
,
SOL_SOCKET
,
SO_LINGER
,
(
char
*
)
&
linger_val
,
&
optlen
);
todo_wine
{
...
...
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