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
948e0815
Commit
948e0815
authored
Dec 14, 2020
by
Francois Gouget
Committed by
Alexandre Julliard
Dec 14, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ws2_32/tests: Skip some raw socket tests when missing elevated privileges.
Signed-off-by:
Francois Gouget
<
fgouget@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
a0559ad5
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
26 additions
and
20 deletions
+26
-20
sock.c
dlls/ws2_32/tests/sock.c
+26
-20
No files found.
dlls/ws2_32/tests/sock.c
View file @
948e0815
...
...
@@ -2551,29 +2551,35 @@ static void test_WSASocket(void)
SOCK_RAW
,
socktype
);
closesocket
(
sock
);
todo_wine
{
sock
=
WSASocketA
(
0
,
0
,
IPPROTO_RAW
,
NULL
,
0
,
0
);
ok
(
sock
!=
INVALID_SOCKET
,
"Failed to create socket: %d
\n
"
,
WSAGetLastError
());
size
=
sizeof
(
socktype
);
socktype
=
0xdead
;
err
=
getsockopt
(
sock
,
SOL_SOCKET
,
SO_TYPE
,
(
char
*
)
&
socktype
,
&
size
);
ok
(
!
err
,
"getsockopt failed with %d
\n
"
,
WSAGetLastError
());
ok
(
socktype
==
SOCK_RAW
,
"Wrong socket type, expected %d received %d
\n
"
,
SOCK_RAW
,
socktype
);
closesocket
(
sock
);
if
(
sock
!=
INVALID_SOCKET
)
{
todo_wine
{
size
=
sizeof
(
socktype
);
socktype
=
0xdead
;
err
=
getsockopt
(
sock
,
SOL_SOCKET
,
SO_TYPE
,
(
char
*
)
&
socktype
,
&
size
);
ok
(
!
err
,
"getsockopt failed with %d
\n
"
,
WSAGetLastError
());
ok
(
socktype
==
SOCK_RAW
,
"Wrong socket type, expected %d received %d
\n
"
,
SOCK_RAW
,
socktype
);
closesocket
(
sock
);
}
sock
=
WSASocketA
(
AF_INET
,
SOCK_RAW
,
IPPROTO_TCP
,
NULL
,
0
,
0
);
ok
(
sock
!=
INVALID_SOCKET
,
"Failed to create socket: %d
\n
"
,
WSAGetLastError
());
size
=
sizeof
(
socktype
);
socktype
=
0xdead
;
err
=
getsockopt
(
sock
,
SOL_SOCKET
,
SO_TYPE
,
(
char
*
)
&
socktype
,
&
size
);
ok
(
!
err
,
"getsockopt failed with %d
\n
"
,
WSAGetLastError
());
ok
(
socktype
==
SOCK_RAW
,
"Wrong socket type, expected %d received %d
\n
"
,
SOCK_RAW
,
socktype
);
closesocket
(
sock
);
}
else
if
(
WSAGetLastError
()
==
WSAEACCES
)
skip
(
"SOCK_RAW is not available
\n
"
);
else
ok
(
0
,
"Failed to create socket: %d
\n
"
,
WSAGetLastError
());
sock
=
WSASocketA
(
AF_INET
,
SOCK_RAW
,
IPPROTO_TCP
,
NULL
,
0
,
0
);
ok
(
sock
!=
INVALID_SOCKET
,
"Failed to create socket: %d
\n
"
,
WSAGetLastError
());
size
=
sizeof
(
socktype
);
socktype
=
0xdead
;
err
=
getsockopt
(
sock
,
SOL_SOCKET
,
SO_TYPE
,
(
char
*
)
&
socktype
,
&
size
);
ok
(
!
err
,
"getsockopt failed with %d
\n
"
,
WSAGetLastError
());
ok
(
socktype
==
SOCK_RAW
,
"Wrong socket type, expected %d received %d
\n
"
,
SOCK_RAW
,
socktype
);
closesocket
(
sock
);
}
/* IPX socket tests */
...
...
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