KERNEL32: Fix comm tests on Win9x (resend)

Felix Nawothnig felix.nawothnig at t-online.de
Sat Jul 30 09:42:59 CDT 2005


Please ignore the previous version of this fix.

Just talked to the author of the failing tests - the second one is there 
  on purpose (as they are marked as todo_wine I should have really 
noticed that...).

Tested on Win98 & WinXP.

ChangeLog:
Fix comm tests on Win9x
-------------- next part --------------
Index: dlls/kernel/tests/comm.c
===================================================================
RCS file: /home/wine/wine/dlls/kernel/tests/comm.c,v
retrieving revision 1.5
diff -u -r1.5 comm.c
--- dlls/kernel/tests/comm.c	27 Jun 2005 19:49:07 -0000	1.5
+++ dlls/kernel/tests/comm.c	30 Jul 2005 14:41:57 -0000
@@ -713,11 +713,12 @@
     ok(SetCommTimeouts(hcom, &timeouts),"SetCommTimeouts failed\n");
 
     before = GetTickCount();
+    SetLastError(0xdeadbeef);
     res = ReadFile(hcom, rbuf, sizeof(rbuf), &read, NULL);
     LastError = GetLastError();
     after = GetTickCount();
     todo_wine ok( res == TRUE, "A timed-out read should return TRUE\n");
-    todo_wine ok( LastError == NO_ERROR, "A timed-out read is not an error\n");
+    todo_wine ok( LastError == 0xdeadbeef, "err=%ld\n", LastError);
     timediff = after - before;
     ok( timediff > TIMEOUT>>2 && timediff < TIMEOUT *2,
 	"Unexpected TimeOut %ld, expected %d\n", timediff, TIMEOUT);


More information about the wine-patches mailing list