Alexandre Julliard : kernel32/tests: Avoid some delays in the process test.

Alexandre Julliard julliard at winehq.org
Thu Sep 14 14:50:09 CDT 2017


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

Author: Alexandre Julliard <julliard at winehq.org>
Date:   Thu Sep 14 17:31:55 2017 +0200

kernel32/tests: Avoid some delays in the process test.

Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 dlls/kernel32/tests/process.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/dlls/kernel32/tests/process.c b/dlls/kernel32/tests/process.c
index c480a27..7e8ef16 100644
--- a/dlls/kernel32/tests/process.c
+++ b/dlls/kernel32/tests/process.c
@@ -1382,7 +1382,7 @@ static  void    test_SuspendFlag(void)
     ok(CreateProcessA(NULL, buffer, NULL, NULL, FALSE, CREATE_SUSPENDED, NULL, NULL, &startup, &info), "CreateProcess\n");
 
     ok(GetExitCodeThread(info.hThread, &exit_status) && exit_status == STILL_ACTIVE, "thread still running\n");
-    Sleep(8000);
+    Sleep(1000);
     ok(GetExitCodeThread(info.hThread, &exit_status) && exit_status == STILL_ACTIVE, "thread still running\n");
     ok(ResumeThread(info.hThread) == 1, "Resuming thread\n");
 
@@ -1652,6 +1652,9 @@ static void test_Console(void)
     ok(ReadFile(hParentIn, buffer, sizeof(buffer), &w, NULL), "Reading from child\n");
     ok(strcmp(buffer, msg) == 0, "Should have received '%s'\n", msg);
 
+    /* the child may also send the final "n tests executed" string, so read it to avoid a deadlock */
+    ReadFile(hParentIn, buffer, sizeof(buffer), &w, NULL);
+
     /* wait for child to terminate */
     ok(WaitForSingleObject(info.hProcess, 30000) == WAIT_OBJECT_0, "Child process termination\n");
     /* child process has changed result file, so let profile functions know about it */




More information about the wine-cvs mailing list