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
9d330d81
Commit
9d330d81
authored
Jul 22, 2023
by
Zebediah Figura
Committed by
Alexandre Julliard
Oct 27, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ws2_32/tests: Make sure that WSARecv() completes synchronously in test_WSARecv().
Wine-Bug:
https://bugs.winehq.org//show_bug.cgi?id=54342
parent
d9ad68a1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
6 deletions
+11
-6
sock.c
dlls/ws2_32/tests/sock.c
+11
-6
No files found.
dlls/ws2_32/tests/sock.c
View file @
9d330d81
...
...
@@ -7626,24 +7626,29 @@ static void test_WSARecv(void)
memset
(
&
ov
,
0
,
sizeof
(
ov
));
flags
=
0
;
bufs
[
0
].
len
=
2
;
bufs
[
0
].
len
=
1
;
bufs
[
0
].
buf
=
buf
;
/* Send
4 bytes and receive in two calls of 2
*/
/* Send
2 bytes and receive in two calls of 1
*/
SetLastError
(
0xdeadbeef
);
iret
=
send
(
src
,
"
test"
,
4
,
0
);
ok
(
iret
==
4
,
"Expected 4,
got %d
\n
"
,
iret
);
iret
=
send
(
src
,
"
ab"
,
2
,
0
);
ok
(
iret
==
2
,
"
got %d
\n
"
,
iret
);
ok
(
GetLastError
()
==
ERROR_SUCCESS
,
"Expected 0, got %ld
\n
"
,
GetLastError
());
SetLastError
(
0xdeadbeef
);
bytesReturned
=
0xdeadbeef
;
/* Non-overlapped WSARecv() performs an alertable wait (tested below), but
* not if it completes synchronously. Make sure it completes synchronously
* by polling for input. */
check_poll_mask
(
dest
,
POLLRDNORM
,
POLLRDNORM
);
apc_count
=
0
;
dwret
=
QueueUserAPC
(
apc_func
,
GetCurrentThread
(),
(
ULONG_PTR
)
&
apc_count
);
ok
(
dwret
,
"QueueUserAPC returned %lu
\n
"
,
dwret
);
iret
=
WSARecv
(
dest
,
bufs
,
1
,
&
bytesReturned
,
&
flags
,
NULL
,
NULL
);
ok
(
!
iret
,
"Expected 0, got %d
\n
"
,
iret
);
ok
(
bytesReturned
==
2
,
"Expected 2,
got %ld
\n
"
,
bytesReturned
);
ok
(
bytesReturned
==
1
,
"
got %ld
\n
"
,
bytesReturned
);
ok
(
GetLastError
()
==
ERROR_SUCCESS
,
"Expected 0, got %ld
\n
"
,
GetLastError
());
ok
(
!
apc_count
,
"got apc_count %u.
\n
"
,
apc_count
);
...
...
@@ -7654,7 +7659,7 @@ static void test_WSARecv(void)
bytesReturned
=
0xdeadbeef
;
iret
=
WSARecv
(
dest
,
bufs
,
1
,
&
bytesReturned
,
&
flags
,
NULL
,
NULL
);
ok
(
!
iret
,
"Expected 0, got %d
\n
"
,
iret
);
ok
(
bytesReturned
==
2
,
"Expected 2,
got %ld
\n
"
,
bytesReturned
);
ok
(
bytesReturned
==
1
,
"
got %ld
\n
"
,
bytesReturned
);
ok
(
GetLastError
()
==
ERROR_SUCCESS
,
"Expected 0, got %ld
\n
"
,
GetLastError
());
bufs
[
0
].
len
=
4
;
...
...
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