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
75fe1064
Commit
75fe1064
authored
Jun 23, 2021
by
Zebediah Figura
Committed by
Alexandre Julliard
Jun 23, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ws2_32/tests: Add some tests for SO_DEBUG.
Signed-off-by:
Zebediah Figura
<
z.figura12@gmail.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
759408c3
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
36 additions
and
0 deletions
+36
-0
sock.c
dlls/ws2_32/tests/sock.c
+36
-0
No files found.
dlls/ws2_32/tests/sock.c
View file @
75fe1064
...
...
@@ -10978,6 +10978,41 @@ static void test_timeout(void)
CloseHandle
(
overlapped
.
hEvent
);
}
static
void
test_so_debug
(
void
)
{
int
ret
,
len
;
DWORD
debug
;
SOCKET
s
;
s
=
socket
(
AF_INET
,
SOCK_STREAM
,
IPPROTO_TCP
);
len
=
sizeof
(
debug
);
WSASetLastError
(
0xdeadbeef
);
debug
=
0xdeadbeef
;
ret
=
getsockopt
(
s
,
SOL_SOCKET
,
SO_DEBUG
,
(
char
*
)
&
debug
,
&
len
);
ok
(
!
ret
,
"got %d
\n
"
,
ret
);
todo_wine
ok
(
!
WSAGetLastError
(),
"got error %u
\n
"
,
WSAGetLastError
());
ok
(
len
==
sizeof
(
debug
),
"got len %u
\n
"
,
len
);
ok
(
!
debug
,
"got debug %u
\n
"
,
debug
);
WSASetLastError
(
0xdeadbeef
);
debug
=
2
;
ret
=
setsockopt
(
s
,
SOL_SOCKET
,
SO_DEBUG
,
(
char
*
)
&
debug
,
sizeof
(
debug
));
ok
(
!
ret
,
"got %d
\n
"
,
ret
);
todo_wine
ok
(
!
WSAGetLastError
(),
"got error %u
\n
"
,
WSAGetLastError
());
len
=
sizeof
(
debug
);
WSASetLastError
(
0xdeadbeef
);
debug
=
0xdeadbeef
;
ret
=
getsockopt
(
s
,
SOL_SOCKET
,
SO_DEBUG
,
(
char
*
)
&
debug
,
&
len
);
ok
(
!
ret
,
"got %d
\n
"
,
ret
);
todo_wine
ok
(
!
WSAGetLastError
(),
"got error %u
\n
"
,
WSAGetLastError
());
ok
(
len
==
sizeof
(
debug
),
"got len %u
\n
"
,
len
);
todo_wine
ok
(
debug
==
1
,
"got debug %u
\n
"
,
debug
);
closesocket
(
s
);
}
START_TEST
(
sock
)
{
int
i
;
...
...
@@ -10993,6 +11028,7 @@ START_TEST( sock )
test_so_reuseaddr
();
test_ip_pktinfo
();
test_extendedSocketOptions
();
test_so_debug
();
for
(
i
=
0
;
i
<
ARRAY_SIZE
(
tests
);
i
++
)
do_test
(
&
tests
[
i
]);
...
...
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