[2/6] kernel32: Make ClearCommError very first test since it depends on device queue being empty.

Dmitry Timoshkov dmitry at baikal.ru
Thu Aug 15 02:38:15 CDT 2013


---
 dlls/kernel32/tests/comm.c | 8 +-------
 1 file changed, 1 insertion(+), 7 deletions(-)

diff --git a/dlls/kernel32/tests/comm.c b/dlls/kernel32/tests/comm.c
index e9a8690..38a8bbc 100644
--- a/dlls/kernel32/tests/comm.c
+++ b/dlls/kernel32/tests/comm.c
@@ -1671,6 +1671,7 @@ START_TEST(comm)
     hcom = test_OpenComm(FALSE);
     if (hcom != INVALID_HANDLE_VALUE)
     {
+	test_ClearCommErrors(hcom); /* keep it the very first test */
 	test_GetModemStatus(hcom);
 	test_ReadTimeOut(hcom);
 	test_waittxempty(hcom);
@@ -1679,13 +1680,6 @@ START_TEST(comm)
     hcom = test_OpenComm(FALSE);
     if (hcom != INVALID_HANDLE_VALUE)
     {
-	Sleep(200); /* Give the laster character of test_waittxempty to drop into the receiver */
-	test_ClearCommErrors(hcom);
-	CloseHandle(hcom);
-    }
-    hcom = test_OpenComm(FALSE);
-    if (hcom != INVALID_HANDLE_VALUE)
-    {
         test_non_pending_errors(hcom);
 	CloseHandle(hcom);
     }
-- 
1.8.3.4




More information about the wine-patches mailing list