James Hawkins : kernel32: Fix a test that fails in win2k3.

Alexandre Julliard julliard at winehq.org
Fri Apr 25 08:11:18 CDT 2008


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

Author: James Hawkins <jhawkins at codeweavers.com>
Date:   Thu Apr 24 22:50:45 2008 -0500

kernel32: Fix a test that fails in win2k3.

---

 dlls/kernel32/tests/sync.c |    8 +++++++-
 1 files changed, 7 insertions(+), 1 deletions(-)

diff --git a/dlls/kernel32/tests/sync.c b/dlls/kernel32/tests/sync.c
index 61b8521..b5778fc 100644
--- a/dlls/kernel32/tests/sync.c
+++ b/dlls/kernel32/tests/sync.c
@@ -370,11 +370,17 @@ static void test_iocp_callback(void)
     ret = DeleteFileA(filename);
     ok( ret, "DeleteFileA: error %d\n", GetLastError());
 
+    /* win2k3 requires the Flags parameter to be zero */
+    SetLastError(0xdeadbeef);
     hFile = CreateFileA(filename, GENERIC_READ | GENERIC_WRITE, 0, NULL,
                         CREATE_ALWAYS, FILE_FLAG_RANDOM_ACCESS | FILE_FLAG_OVERLAPPED, 0);
     ok(hFile != INVALID_HANDLE_VALUE, "CreateFileA: error %d\n", GetLastError());
     retb = p_BindIoCompletionCallback(hFile, iocp_callback, 12345);
-    ok(retb == TRUE, "BindIoCompletionCallback failed with Flags != 0\n");
+    if (!retb)
+        ok(GetLastError() == ERROR_INVALID_PARAMETER,
+           "Expected ERROR_INVALID_PARAMETER, got %d\n", GetLastError());
+    else
+        ok(retb == TRUE, "BindIoCompletionCallback failed with Flags != 0\n");
     ret = CloseHandle(hFile);
     ok( ret, "CloseHandle: error %d\n", GetLastError());
     ret = DeleteFileA(filename);




More information about the wine-cvs mailing list