diff --git a/dlls/kernel32/tests/thread.c b/dlls/kernel32/tests/thread.c index 19726af54b2..76a7a33184f 100644 --- a/dlls/kernel32/tests/thread.c +++ b/dlls/kernel32/tests/thread.c @@ -961,16 +961,19 @@ static void test_SetThreadContext(void) ctx.ContextFlags = CONTEXT_FULL; SetLastError(0xdeadbeef); ret = GetThreadContext( thread, &ctx ); - ok( !ret, "GetThreadContext succeeded\n" ); - ok( GetLastError() == ERROR_GEN_FAILURE || broken(GetLastError() == ERROR_INVALID_HANDLE), /* win2k */ - "wrong error %u\n", GetLastError() ); + ok( (!ret && (GetLastError() == ERROR_GEN_FAILURE)) || + (!ret && broken(GetLastError() == ERROR_INVALID_HANDLE)) || /* win2k */ + broken(ret), /* 32bit application on NT 5.x 64bit */ + "got %d with %u (expected FALSE with ERROR_GEN_FAILURE)\n", + ret, GetLastError() ); SetLastError(0xdeadbeef); ret = SetThreadContext( thread, &ctx ); - ok( !ret, "SetThreadContext succeeded\n" ); - ok( GetLastError() == ERROR_GEN_FAILURE || GetLastError() == ERROR_ACCESS_DENIED || - broken(GetLastError() == ERROR_INVALID_HANDLE), /* win2k */ - "wrong error %u\n", GetLastError() ); + ok( (!ret && ((GetLastError() == ERROR_GEN_FAILURE) || (GetLastError() == ERROR_ACCESS_DENIED))) || + (!ret && broken(GetLastError() == ERROR_INVALID_HANDLE)) || /* win2k */ + broken(ret), /* 32bit application on NT 5.x 64bit */ + "got %d with %u (expected FALSE with ERROR_GEN_FAILURE or ERROR_ACCESS_DENIED)\n", + ret, GetLastError() ); CloseHandle( thread ); }