From 33c5d44d495a620568c798d36381541ec9f0a40e Mon Sep 17 00:00:00 2001 From: Alexandre Julliard Date: Thu, 11 Sep 2008 14:07:54 +0200 Subject: [PATCH] kernel32/tests: Fix the BindIoCompletionCallback test on Vista. --- dlls/kernel32/tests/sync.c | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) diff --git a/dlls/kernel32/tests/sync.c b/dlls/kernel32/tests/sync.c index b685259befd..40ee4bbde94 100644 --- a/dlls/kernel32/tests/sync.c +++ b/dlls/kernel32/tests/sync.c @@ -512,16 +512,6 @@ static void test_iocp_callback(void) ret = DeleteFileA(filename); ok( ret, "DeleteFileA: error %d\n", GetLastError()); - 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, NULL, 0); - ok(retb == TRUE, "BindIoCompletionCallback failed with a NULL callback(first time set)\n"); - ret = CloseHandle(hFile); - ok( ret, "CloseHandle: error %d\n", GetLastError()); - 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, @@ -540,7 +530,9 @@ static void test_iocp_callback(void) retb = p_BindIoCompletionCallback(NULL, iocp_callback, 0); ok(retb == FALSE, "BindIoCompletionCallback succeeded on a NULL file\n"); - ok(GetLastError() == ERROR_INVALID_HANDLE, "Last error is %d\n", GetLastError()); + ok(GetLastError() == ERROR_INVALID_HANDLE || + GetLastError() == ERROR_INVALID_PARAMETER, /* vista */ + "Last error is %d\n", GetLastError()); } static void CALLBACK timer_queue_cb1(PVOID p, BOOLEAN timedOut)