Alexandre Julliard : kernel32/tests: Wait for threads to terminate.

Alexandre Julliard julliard at winehq.org
Mon Jul 10 15:52:44 CDT 2017


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

Author: Alexandre Julliard <julliard at winehq.org>
Date:   Mon Jul 10 11:17:10 2017 +0200

kernel32/tests: Wait for threads to terminate.

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

---

 dlls/kernel32/tests/comm.c | 12 ++++++++++++
 1 file changed, 12 insertions(+)

diff --git a/dlls/kernel32/tests/comm.c b/dlls/kernel32/tests/comm.c
index 6b0c3ed..4fb9de1 100644
--- a/dlls/kernel32/tests/comm.c
+++ b/dlls/kernel32/tests/comm.c
@@ -1506,6 +1506,8 @@ static void test_WaitCts(void)
 	args[1] = CLRRTS;
 
     CloseHandle(hcom);
+    ok( !WaitForSingleObject( alarmThread, 10000 ), "thread still running\n" );
+    CloseHandle( alarmThread );
 }
 
 /* Change the  Comm Mask while a Wait is going on
@@ -1588,6 +1590,8 @@ static void test_AbortWaitCts(void)
                   "Unexpected time %d, expected around %d\n", diff, TIMEOUT>>1);
 
     CloseHandle(hcom);
+    ok( !WaitForSingleObject( alarmThread, 10000 ), "thread still running\n" );
+    CloseHandle( alarmThread );
 }
 
 /*
@@ -1668,6 +1672,8 @@ static void test_WaitDsr(void)
 	args[1] = CLRDTR;
 
     CloseHandle(hcom);
+    ok( !WaitForSingleObject( alarmThread, 10000 ), "thread still running\n" );
+    CloseHandle( alarmThread );
 }
 
 /*
@@ -1754,6 +1760,8 @@ static void test_WaitRing(void)
 	args[1] = CLRDTR;
 
     CloseHandle(hcom);
+    ok( !WaitForSingleObject( alarmThread, 10000 ), "thread still running\n" );
+    CloseHandle( alarmThread );
 }
 /*
  * Wait for a change in DCD
@@ -1833,6 +1841,8 @@ static void test_WaitDcd(void)
 	args[1] = CLRDTR;
 
     CloseHandle(hcom);
+    ok( !WaitForSingleObject( alarmThread, 10000 ), "thread still running\n" );
+    CloseHandle( alarmThread );
 }
 
 /* 
@@ -1914,6 +1924,8 @@ static void test_WaitBreak(void)
     ok(ClearCommBreak(hcom), "ClearCommBreak failed\n");
 
     CloseHandle(hcom);
+    ok( !WaitForSingleObject( alarmThread, 10000 ), "thread still running\n" );
+    CloseHandle( alarmThread );
 }
 
 static void test_stdio(void)




More information about the wine-cvs mailing list