Module: wine
Branch: master
Commit: 0aa6f8e2ea1e3f2e852bef1a07d0d1f983870150
URL: https://source.winehq.org/git/wine.git/?a=commit;h=0aa6f8e2ea1e3f2e852bef1a…
Author: Zebediah Figura <z.figura12(a)gmail.com>
Date: Wed Dec 16 10:51:49 2020 -0600
httpapi/tests: Sleep before calling GetOverlappedResult() in test_v2_server().
This seems to be a variation of a bug already encountered; here the kernel does
not report the right value in the IOSB until after completion is signaled.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=48587
Signed-off-by: Zebediah Figura <z.figura12(a)gmail.com>
Signed-off-by: Alexandre Julliard <julliard(a)winehq.org>
---
dlls/httpapi/tests/httpapi.c | 14 ++++++++++----
1 file changed, 10 insertions(+), 4 deletions(-)
diff --git a/dlls/httpapi/tests/httpapi.c b/dlls/httpapi/tests/httpapi.c
index c54158d45a2..5d79197505c 100644
--- a/dlls/httpapi/tests/httpapi.c
+++ b/dlls/httpapi/tests/httpapi.c
@@ -233,9 +233,11 @@ static void test_v1_server(void)
ok(ret, "Got error %u.\n", GetLastError());
ok(ret_size > sizeof(*req), "Got size %u.\n", ret_size);
- /* 64-bit Windows 10 version 1507 apparently suffers from a bug where it
- * will report success before completely filling the buffer. Wait for a
- * short interval to work around this. */
+ /* Various versions of Windows (observed on 64-bit Windows 8 and Windows 10
+ * version 1507, but probably affecting others) suffer from a bug where the
+ * kernel will report success before completely filling the buffer or
+ * reporting the correct buffer size. Wait for a short interval to work
+ * around this. */
Sleep(100);
ok(!req->Flags, "Got flags %#x.\n", req->Flags);
@@ -1296,10 +1298,14 @@ static void test_v2_server(void)
ret = send(s, req_text, strlen(req_text), 0);
ok(ret == strlen(req_text), "send() returned %d.\n", ret);
+ ret = WaitForSingleObject(ovl.hEvent, 100);
+ ok(!ret, "Got %u.\n", ret);
+
+ Sleep(100);
+
ret = GetOverlappedResult(queue, &ovl, &ret_size, TRUE);
ok(ret, "Got error %u.\n", GetLastError());
ok(ret_size > sizeof(*req), "Got size %u.\n", ret_size);
- Sleep(100);
ok(!req->Flags, "Got flags %#x.\n", req->Flags);
ok(req->ConnectionId, "Expected nonzero connection ID.\n");