Sebastian Lackner : kernel32/tests: Add better handling for test failure in test_readfileex_pending.

Alexandre Julliard julliard at wine.codeweavers.com
Thu Aug 21 15:42:13 CDT 2014


Module: wine
Branch: master
Commit: 3e23aa57691df99ecb222c7abd4edc0ca2ffc289
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=3e23aa57691df99ecb222c7abd4edc0ca2ffc289

Author: Sebastian Lackner <sebastian at fds-team.de>
Date:   Wed Jul 30 18:00:19 2014 +0200

kernel32/tests: Add better handling for test failure in test_readfileex_pending.

---

 dlls/kernel32/tests/pipe.c | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/dlls/kernel32/tests/pipe.c b/dlls/kernel32/tests/pipe.c
index 457e62b..1cdc2ee 100644
--- a/dlls/kernel32/tests/pipe.c
+++ b/dlls/kernel32/tests/pipe.c
@@ -1845,6 +1845,14 @@ static void test_readfileex_pending(void)
 
     wait = WaitForSingleObjectEx(event, 0, TRUE);
     ok(wait == WAIT_IO_COMPLETION || wait == WAIT_OBJECT_0, "WaitForSingleObject returned %x\n", wait);
+    if (wait == WAIT_TIMEOUT)
+    {
+        ret = ReadFile(client, read_buf, sizeof(read_buf), &num_bytes, NULL);
+        ok(ret == TRUE, "ReadFile failed\n");
+        ok(completion_called == 0, "completion routine called during ReadFile\n");
+        wait = WaitForSingleObjectEx(event, 0, TRUE);
+        ok(wait == WAIT_IO_COMPLETION || wait == WAIT_OBJECT_0, "WaitForSingleObject returned %x\n", wait);
+    }
 
     ok(completion_called == 1, "completion routine not called\n");
     ok(completion_errorcode == 0, "completion called with error %x\n", completion_errorcode);




More information about the wine-cvs mailing list