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
0959b2ac
Commit
0959b2ac
authored
Jan 29, 2022
by
Fabian Maurer
Committed by
Alexandre Julliard
Jan 31, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ws2_32/tests: Avoid "misleading indentation" warnings.
Signed-off-by:
Fabian Maurer
<
dark.shadow4@web.de
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
874473c5
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
37 additions
and
37 deletions
+37
-37
protocol.c
dlls/ws2_32/tests/protocol.c
+24
-24
sock.c
dlls/ws2_32/tests/sock.c
+13
-13
No files found.
dlls/ws2_32/tests/protocol.c
View file @
0959b2ac
...
...
@@ -393,13 +393,13 @@ static void test_WSALookupService(void)
ret
=
WSALookupServiceBeginW
(
NULL
,
0
,
&
handle
);
error
=
WSAGetLastError
();
ok
(
ret
==
SOCKET_ERROR
,
"WSALookupServiceBeginW should have failed
\n
"
);
todo_wine
todo_wine
ok
(
error
==
WSAEFAULT
,
"expected 10014, got %d
\n
"
,
error
);
ret
=
WSALookupServiceBeginW
(
qs
,
0
,
NULL
);
error
=
WSAGetLastError
();
ok
(
ret
==
SOCKET_ERROR
,
"WSALookupServiceBeginW should have failed
\n
"
);
todo_wine
todo_wine
ok
(
error
==
WSAEFAULT
,
"expected 10014, got %d
\n
"
,
error
);
ret
=
WSALookupServiceBeginW
(
qs
,
0
,
&
handle
);
...
...
@@ -410,9 +410,9 @@ todo_wine
ret
=
WSALookupServiceEnd
(
NULL
);
error
=
WSAGetLastError
();
todo_wine
todo_wine
ok
(
ret
==
SOCKET_ERROR
,
"WSALookupServiceEnd should have failed
\n
"
);
todo_wine
todo_wine
ok
(
error
==
ERROR_INVALID_HANDLE
,
"expected 6, got %d
\n
"
,
error
);
/* standard network list query */
...
...
@@ -426,9 +426,9 @@ todo_wine
return
;
}
todo_wine
todo_wine
ok
(
!
ret
,
"WSALookupServiceBeginW failed unexpectedly with error %d
\n
"
,
error
);
todo_wine
todo_wine
ok
(
handle
!=
(
HANDLE
)
0xdeadbeef
,
"Handle was not filled
\n
"
);
offset
=
0
;
...
...
@@ -2610,40 +2610,40 @@ static void test_WSAEnumNameSpaceProvidersA(void)
SetLastError
(
0xdeadbeef
);
ret
=
WSAEnumNameSpaceProvidersA
(
&
len
,
name
);
error
=
WSAGetLastError
();
todo_wine
todo_wine
ok
(
ret
==
SOCKET_ERROR
,
"Expected failure, got %u
\n
"
,
ret
);
todo_wine
todo_wine
ok
(
error
==
WSAEFAULT
,
"Expected 10014, got %u
\n
"
,
error
);
/* Invalid parameter tests */
SetLastError
(
0xdeadbeef
);
ret
=
WSAEnumNameSpaceProvidersA
(
NULL
,
name
);
error
=
WSAGetLastError
();
todo_wine
todo_wine
ok
(
ret
==
SOCKET_ERROR
,
"Expected failure, got %u
\n
"
,
ret
);
todo_wine
todo_wine
ok
(
error
==
WSAEFAULT
,
"Expected 10014, got %u
\n
"
,
error
);
SetLastError
(
0xdeadbeef
);
ret
=
WSAEnumNameSpaceProvidersA
(
NULL
,
NULL
);
error
=
WSAGetLastError
();
todo_wine
todo_wine
ok
(
ret
==
SOCKET_ERROR
,
"Expected failure, got %u
\n
"
,
ret
);
todo_wine
todo_wine
ok
(
error
==
WSAEFAULT
,
"Expected 10014, got %u
\n
"
,
error
);
SetLastError
(
0xdeadbeef
);
ret
=
WSAEnumNameSpaceProvidersA
(
&
len
,
NULL
);
error
=
WSAGetLastError
();
todo_wine
todo_wine
ok
(
ret
==
SOCKET_ERROR
,
"Expected failure, got %u
\n
"
,
ret
);
todo_wine
todo_wine
ok
(
error
==
WSAEFAULT
,
"Expected 10014, got %u
\n
"
,
error
);
name
=
HeapAlloc
(
GetProcessHeap
(),
0
,
len
);
ret
=
WSAEnumNameSpaceProvidersA
(
&
len
,
name
);
todo_wine
todo_wine
ok
(
ret
>
0
,
"Expected more than zero name space providers
\n
"
);
HeapFree
(
GetProcessHeap
(),
0
,
name
);
...
...
@@ -2657,40 +2657,40 @@ static void test_WSAEnumNameSpaceProvidersW(void)
SetLastError
(
0xdeadbeef
);
ret
=
WSAEnumNameSpaceProvidersW
(
&
len
,
name
);
error
=
WSAGetLastError
();
todo_wine
todo_wine
ok
(
ret
==
SOCKET_ERROR
,
"Expected failure, got %u
\n
"
,
ret
);
todo_wine
todo_wine
ok
(
error
==
WSAEFAULT
,
"Expected 10014, got %u
\n
"
,
error
);
/* Invalid parameter tests */
SetLastError
(
0xdeadbeef
);
ret
=
WSAEnumNameSpaceProvidersW
(
NULL
,
name
);
error
=
WSAGetLastError
();
todo_wine
todo_wine
ok
(
ret
==
SOCKET_ERROR
,
"Expected failure, got %u
\n
"
,
ret
);
todo_wine
todo_wine
ok
(
error
==
WSAEFAULT
,
"Expected 10014, got %u
\n
"
,
error
);
SetLastError
(
0xdeadbeef
);
ret
=
WSAEnumNameSpaceProvidersW
(
NULL
,
NULL
);
error
=
WSAGetLastError
();
todo_wine
todo_wine
ok
(
ret
==
SOCKET_ERROR
,
"Expected failure, got %u
\n
"
,
ret
);
todo_wine
todo_wine
ok
(
error
==
WSAEFAULT
,
"Expected 10014, got %u
\n
"
,
error
);
SetLastError
(
0xdeadbeef
);
ret
=
WSAEnumNameSpaceProvidersW
(
&
len
,
NULL
);
error
=
WSAGetLastError
();
todo_wine
todo_wine
ok
(
ret
==
SOCKET_ERROR
,
"Expected failure, got %u
\n
"
,
ret
);
todo_wine
todo_wine
ok
(
error
==
WSAEFAULT
,
"Expected 10014, got %u
\n
"
,
error
);
name
=
HeapAlloc
(
GetProcessHeap
(),
0
,
len
);
ret
=
WSAEnumNameSpaceProvidersW
(
&
len
,
name
);
todo_wine
todo_wine
ok
(
ret
>
0
,
"Expected more than zero name space providers
\n
"
);
if
(
winetest_debug
>
1
)
...
...
dlls/ws2_32/tests/sock.c
View file @
0959b2ac
...
...
@@ -1289,7 +1289,7 @@ static void test_set_getsockopt(void)
SetLastError
(
0xdeadbeef
);
i
=
1234
;
err
=
setsockopt
(
s
,
SOL_SOCKET
,
SO_ERROR
,
(
char
*
)
&
i
,
size
);
todo_wine
todo_wine
ok
(
!
err
&&
!
WSAGetLastError
(),
"got %d with %d (expected 0 with 0)
\n
"
,
err
,
WSAGetLastError
());
...
...
@@ -1300,7 +1300,7 @@ todo_wine
ok
(
!
err
&&
!
WSAGetLastError
(),
"got %d with %d (expected 0 with 0)
\n
"
,
err
,
WSAGetLastError
());
todo_wine
todo_wine
ok
(
i
==
1234
,
"got %d (expected 1234)
\n
"
,
i
);
/* Test invalid optlen */
...
...
@@ -6054,7 +6054,7 @@ todo_wine {
ret
=
pWSASendMsg
(
sock
,
&
msg
,
0
,
&
bytesSent
,
NULL
,
NULL
);
ok
(
ret
==
SOCKET_ERROR
,
"WSASendMsg should have failed
\n
"
);
err
=
WSAGetLastError
();
todo_wine
todo_wine
ok
(
err
==
WSAEINVAL
,
"expected 10014, got %d instead
\n
"
,
err
);
closesocket
(
sock
);
}
...
...
@@ -7184,7 +7184,7 @@ static void test_AcceptEx(void)
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
todo_wine
ok
(
bret
==
FALSE
&&
WSAGetLastError
()
==
WSAEINVAL
,
"AcceptEx on a non-listening socket "
"returned %d + errno %d
\n
"
,
bret
,
WSAGetLastError
());
ok
(
overlapped
.
Internal
==
STATUS_PENDING
,
"got %08x
\n
"
,
(
ULONG
)
overlapped
.
Internal
);
...
...
@@ -8768,7 +8768,7 @@ static void test_sioAddressListChange(void)
ok
(
ret
==
WAIT_OBJECT_0
,
"failed to get overlapped event %u
\n
"
,
ret
);
ret
=
WaitForSingleObject
(
event2
,
500
);
todo_wine
todo_wine
ok
(
ret
==
WAIT_OBJECT_0
,
"failed to get change event %u
\n
"
,
ret
);
ret
=
WaitForSingleObject
(
event3
,
500
);
...
...
@@ -10329,7 +10329,7 @@ todo_wine
SetLastError
(
0xdeadbeef
);
ret
=
GetQueuedCompletionStatus
(
port
,
&
bytes
,
&
key
,
&
ovl_iocp
,
100
);
ok
(
!
ret
,
"got %d
\n
"
,
ret
);
todo_wine
todo_wine
ok
(
GetLastError
()
==
ERROR_CONNECTION_ABORTED
||
GetLastError
()
==
ERROR_NETNAME_DELETED
/* XP */
,
"got %u
\n
"
,
GetLastError
());
ok
(
!
bytes
,
"got bytes %u
\n
"
,
bytes
);
ok
(
key
==
0x12345678
,
"got key %#lx
\n
"
,
key
);
...
...
@@ -10337,7 +10337,7 @@ todo_wine
if
(
ovl_iocp
)
{
ok
(
!
ovl_iocp
->
InternalHigh
,
"got %#lx
\n
"
,
ovl_iocp
->
InternalHigh
);
todo_wine
todo_wine
ok
(
ovl_iocp
->
Internal
==
(
ULONG
)
STATUS_CONNECTION_ABORTED
||
ovl_iocp
->
Internal
==
(
ULONG
)
STATUS_LOCAL_DISCONNECT
/* XP */
,
"got %#lx
\n
"
,
ovl_iocp
->
Internal
);
}
...
...
@@ -10568,7 +10568,7 @@ static void iocp_async_read_thread_closesocket(SOCKET src)
SetLastError
(
0xdeadbeef
);
ret
=
GetQueuedCompletionStatus
(
port
,
&
bytes
,
&
key
,
&
ovl_iocp
,
100
);
ok
(
!
ret
,
"got %d
\n
"
,
ret
);
todo_wine
todo_wine
ok
(
GetLastError
()
==
ERROR_CONNECTION_ABORTED
||
GetLastError
()
==
ERROR_NETNAME_DELETED
/* XP */
,
"got %u
\n
"
,
GetLastError
());
ok
(
!
bytes
,
"got bytes %u
\n
"
,
bytes
);
ok
(
key
==
0x12345678
,
"got key %#lx
\n
"
,
key
);
...
...
@@ -10576,7 +10576,7 @@ todo_wine
if
(
ovl_iocp
)
{
ok
(
!
ovl_iocp
->
InternalHigh
,
"got %#lx
\n
"
,
ovl_iocp
->
InternalHigh
);
todo_wine
todo_wine
ok
(
ovl_iocp
->
Internal
==
(
ULONG
)
STATUS_CONNECTION_ABORTED
||
ovl_iocp
->
Internal
==
(
ULONG
)
STATUS_LOCAL_DISCONNECT
/* XP */
,
"got %#lx
\n
"
,
ovl_iocp
->
Internal
);
}
...
...
@@ -11724,10 +11724,10 @@ static void do_sockopt_validity_tests(const char *type, SOCKET sock, int level,
WSASetLastError
(
0
);
rc
=
getsockopt
(
sock
,
level
,
tests
[
i
].
opt
,
value
,
&
count
);
expected_rc
=
tests
[
i
].
get_error
?
SOCKET_ERROR
:
0
;
todo_wine_if
(
!
tests
[
i
].
get_error
&&
tests
[
i
].
todo
)
todo_wine_if
(
!
tests
[
i
].
get_error
&&
tests
[
i
].
todo
)
ok
(
rc
==
expected_rc
||
broken
(
rc
==
SOCKET_ERROR
&&
WSAGetLastError
()
==
WSAENOPROTOOPT
),
"expected getsockopt to return %i, got %i
\n
"
,
expected_rc
,
rc
);
todo_wine_if
(
tests
[
i
].
todo
)
todo_wine_if
(
tests
[
i
].
todo
)
ok
(
WSAGetLastError
()
==
tests
[
i
].
get_error
||
broken
(
rc
==
SOCKET_ERROR
&&
WSAGetLastError
()
==
WSAENOPROTOOPT
),
"expected getsockopt to set error %i, got %i
\n
"
,
tests
[
i
].
get_error
,
WSAGetLastError
());
...
...
@@ -11740,10 +11740,10 @@ todo_wine_if(tests[i].todo)
WSASetLastError
(
0
);
rc
=
setsockopt
(
sock
,
level
,
tests
[
i
].
opt
,
value
,
count
);
expected_rc
=
tests
[
i
].
set_error
?
SOCKET_ERROR
:
0
;
todo_wine_if
(
!
tests
[
i
].
set_error
&&
tests
[
i
].
todo
)
todo_wine_if
(
!
tests
[
i
].
set_error
&&
tests
[
i
].
todo
)
ok
(
rc
==
expected_rc
||
broken
(
rc
==
SOCKET_ERROR
&&
WSAGetLastError
()
==
WSAENOPROTOOPT
),
"expected setsockopt to return %i, got %i
\n
"
,
expected_rc
,
rc
);
todo_wine_if
(
tests
[
i
].
todo
)
todo_wine_if
(
tests
[
i
].
todo
)
ok
(
WSAGetLastError
()
==
tests
[
i
].
set_error
||
broken
(
rc
==
SOCKET_ERROR
&&
WSAGetLastError
()
==
WSAENOPROTOOPT
),
"expected setsockopt to set error %i, got %i
\n
"
,
tests
[
i
].
set_error
,
WSAGetLastError
());
...
...
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