Commit 59895345 authored by Francois Gouget's avatar Francois Gouget Committed by Alexandre Julliard

kernel32/tests: Use win_skip() to skip over unimplemented functionality.

parent b2f2e53f
...@@ -1202,7 +1202,7 @@ START_TEST(actctx) ...@@ -1202,7 +1202,7 @@ START_TEST(actctx)
if (!init_funcs()) if (!init_funcs())
{ {
skip("Needed functions are not available\n"); win_skip("Needed functions are not available\n");
return; return;
} }
init_paths(); init_paths();
......
...@@ -264,7 +264,7 @@ static void test_ffcn(void) ...@@ -264,7 +264,7 @@ static void test_ffcn(void)
r = GetTempPathW( MAX_PATH, path ); r = GetTempPathW( MAX_PATH, path );
if (!r && (GetLastError() == ERROR_CALL_NOT_IMPLEMENTED)) if (!r && (GetLastError() == ERROR_CALL_NOT_IMPLEMENTED))
{ {
skip("GetTempPathW is not implemented\n"); win_skip("GetTempPathW is not implemented\n");
return; return;
} }
ok( r != 0, "temp path failed\n"); ok( r != 0, "temp path failed\n");
...@@ -387,7 +387,7 @@ static void test_readdirectorychanges(void) ...@@ -387,7 +387,7 @@ static void test_readdirectorychanges(void)
if (!pReadDirectoryChangesW) if (!pReadDirectoryChangesW)
{ {
skip("ReadDirectoryChangesW is not available\n"); win_skip("ReadDirectoryChangesW is not available\n");
return; return;
} }
...@@ -395,7 +395,7 @@ static void test_readdirectorychanges(void) ...@@ -395,7 +395,7 @@ static void test_readdirectorychanges(void)
r = GetTempPathW( MAX_PATH, path ); r = GetTempPathW( MAX_PATH, path );
if (!r && (GetLastError() == ERROR_CALL_NOT_IMPLEMENTED)) if (!r && (GetLastError() == ERROR_CALL_NOT_IMPLEMENTED))
{ {
skip("GetTempPathW is not implemented\n"); win_skip("GetTempPathW is not implemented\n");
return; return;
} }
ok( r != 0, "temp path failed\n"); ok( r != 0, "temp path failed\n");
...@@ -615,14 +615,14 @@ static void test_readdirectorychanges_null(void) ...@@ -615,14 +615,14 @@ static void test_readdirectorychanges_null(void)
if (!pReadDirectoryChangesW) if (!pReadDirectoryChangesW)
{ {
skip("ReadDirectoryChangesW is not available\n"); win_skip("ReadDirectoryChangesW is not available\n");
return; return;
} }
SetLastError(0xdeadbeef); SetLastError(0xdeadbeef);
r = GetTempPathW( MAX_PATH, path ); r = GetTempPathW( MAX_PATH, path );
if (!r && (GetLastError() == ERROR_CALL_NOT_IMPLEMENTED)) if (!r && (GetLastError() == ERROR_CALL_NOT_IMPLEMENTED))
{ {
skip("GetTempPathW is not implemented\n"); win_skip("GetTempPathW is not implemented\n");
return; return;
} }
ok( r != 0, "temp path failed\n"); ok( r != 0, "temp path failed\n");
...@@ -717,7 +717,7 @@ static void test_readdirectorychanges_filedir(void) ...@@ -717,7 +717,7 @@ static void test_readdirectorychanges_filedir(void)
r = GetTempPathW( MAX_PATH, path ); r = GetTempPathW( MAX_PATH, path );
if (!r && (GetLastError() == ERROR_CALL_NOT_IMPLEMENTED)) if (!r && (GetLastError() == ERROR_CALL_NOT_IMPLEMENTED))
{ {
skip("GetTempPathW is not implemented\n"); win_skip("GetTempPathW is not implemented\n");
return; return;
} }
ok( r != 0, "temp path failed\n"); ok( r != 0, "temp path failed\n");
......
...@@ -706,7 +706,7 @@ static void testScreenBuffer(HANDLE hConOut) ...@@ -706,7 +706,7 @@ static void testScreenBuffer(HANDLE hConOut)
ret = SetConsoleOutputCP(866); ret = SetConsoleOutputCP(866);
if (!ret && GetLastError() == ERROR_CALL_NOT_IMPLEMENTED) if (!ret && GetLastError() == ERROR_CALL_NOT_IMPLEMENTED)
{ {
skip("SetConsoleOutputCP is not implemented\n"); win_skip("SetConsoleOutputCP is not implemented\n");
return; return;
} }
ok(ret, "Cannot set output codepage to 866\n"); ok(ret, "Cannot set output codepage to 866\n");
...@@ -962,7 +962,7 @@ START_TEST(console) ...@@ -962,7 +962,7 @@ START_TEST(console)
if (!pGetConsoleInputExeNameA || !pSetConsoleInputExeNameA) if (!pGetConsoleInputExeNameA || !pSetConsoleInputExeNameA)
{ {
skip("GetConsoleInputExeNameA and/or SetConsoleInputExeNameA is not available\n"); win_skip("GetConsoleInputExeNameA and/or SetConsoleInputExeNameA is not available\n");
return; return;
} }
else else
......
...@@ -148,7 +148,7 @@ static void test_GetSetEnvironmentVariableW(void) ...@@ -148,7 +148,7 @@ static void test_GetSetEnvironmentVariableW(void)
if (ret == FALSE && GetLastError()==ERROR_CALL_NOT_IMPLEMENTED) if (ret == FALSE && GetLastError()==ERROR_CALL_NOT_IMPLEMENTED)
{ {
/* Must be Win9x which doesn't support the Unicode functions */ /* Must be Win9x which doesn't support the Unicode functions */
skip("SetEnvironmentVariableW is not implemented\n"); win_skip("SetEnvironmentVariableW is not implemented\n");
return; return;
} }
ok(ret == TRUE, ok(ret == TRUE,
...@@ -359,7 +359,7 @@ static void test_GetComputerName(void) ...@@ -359,7 +359,7 @@ static void test_GetComputerName(void)
ret = GetComputerNameW((LPWSTR)0xdeadbeef, &size); ret = GetComputerNameW((LPWSTR)0xdeadbeef, &size);
error = GetLastError(); error = GetLastError();
if (error == ERROR_CALL_NOT_IMPLEMENTED) if (error == ERROR_CALL_NOT_IMPLEMENTED)
skip("GetComputerNameW is not implemented\n"); win_skip("GetComputerNameW is not implemented\n");
else else
{ {
todo_wine todo_wine
...@@ -384,7 +384,7 @@ static void test_GetComputerNameExA(void) ...@@ -384,7 +384,7 @@ static void test_GetComputerNameExA(void)
if (!pGetComputerNameExA) if (!pGetComputerNameExA)
{ {
skip("GetComputerNameExA function not implemented\n"); win_skip("GetComputerNameExA function not implemented\n");
return; return;
} }
...@@ -458,7 +458,7 @@ static void test_GetComputerNameExW(void) ...@@ -458,7 +458,7 @@ static void test_GetComputerNameExW(void)
if (!pGetComputerNameExW) if (!pGetComputerNameExW)
{ {
skip("GetComputerNameExW function not implemented\n"); win_skip("GetComputerNameExW function not implemented\n");
return; return;
} }
......
...@@ -1506,7 +1506,7 @@ static void test_FindFirstFileExA(void) ...@@ -1506,7 +1506,7 @@ static void test_FindFirstFileExA(void)
if (!pFindFirstFileExA) if (!pFindFirstFileExA)
{ {
skip("FindFirstFileExA() is missing\n"); win_skip("FindFirstFileExA() is missing\n");
return; return;
} }
...@@ -1519,7 +1519,7 @@ static void test_FindFirstFileExA(void) ...@@ -1519,7 +1519,7 @@ static void test_FindFirstFileExA(void)
handle = pFindFirstFileExA("test-dir\\*", FindExInfoStandard, &search_results, FindExSearchLimitToDirectories, NULL, 0); handle = pFindFirstFileExA("test-dir\\*", FindExInfoStandard, &search_results, FindExSearchLimitToDirectories, NULL, 0);
if (handle == INVALID_HANDLE_VALUE && GetLastError() == ERROR_CALL_NOT_IMPLEMENTED) if (handle == INVALID_HANDLE_VALUE && GetLastError() == ERROR_CALL_NOT_IMPLEMENTED)
{ {
skip("FindFirstFileExA is not implemented\n"); win_skip("FindFirstFileExA is not implemented\n");
goto cleanup; goto cleanup;
} }
ok(handle != INVALID_HANDLE_VALUE, "FindFirstFile failed (err=%u)\n", GetLastError()); ok(handle != INVALID_HANDLE_VALUE, "FindFirstFile failed (err=%u)\n", GetLastError());
...@@ -2139,7 +2139,7 @@ static void test_ReplaceFileA(void) ...@@ -2139,7 +2139,7 @@ static void test_ReplaceFileA(void)
if (!pReplaceFileA) if (!pReplaceFileA)
{ {
skip("ReplaceFileA() is missing\n"); win_skip("ReplaceFileA() is missing\n");
return; return;
} }
...@@ -2347,7 +2347,7 @@ static void test_ReplaceFileW(void) ...@@ -2347,7 +2347,7 @@ static void test_ReplaceFileW(void)
if (!pReplaceFileW) if (!pReplaceFileW)
{ {
skip("ReplaceFileW() is missing\n"); win_skip("ReplaceFileW() is missing\n");
return; return;
} }
......
...@@ -237,7 +237,7 @@ static void test_message_null_buffer(void) ...@@ -237,7 +237,7 @@ static void test_message_null_buffer(void)
error = GetLastError(); error = GetLastError();
if (!ret && error == ERROR_CALL_NOT_IMPLEMENTED) if (!ret && error == ERROR_CALL_NOT_IMPLEMENTED)
{ {
skip("FormatMessageW is not implemented\n"); win_skip("FormatMessageW is not implemented\n");
return; return;
} }
......
...@@ -1909,7 +1909,7 @@ static void test_FoldStringW(void) ...@@ -1909,7 +1909,7 @@ static void test_FoldStringW(void)
if (!pFoldStringW) if (!pFoldStringW)
{ {
skip("FoldStringW is not available\n"); win_skip("FoldStringW is not available\n");
return; /* FoldString is present in NT v3.1+, but not 95/98/Me */ return; /* FoldString is present in NT v3.1+, but not 95/98/Me */
} }
...@@ -1921,7 +1921,7 @@ static void test_FoldStringW(void) ...@@ -1921,7 +1921,7 @@ static void test_FoldStringW(void)
ret = pFoldStringW(badFlags[i], src, 256, dst, 256); ret = pFoldStringW(badFlags[i], src, 256, dst, 256);
if (GetLastError()==ERROR_CALL_NOT_IMPLEMENTED) if (GetLastError()==ERROR_CALL_NOT_IMPLEMENTED)
{ {
skip("FoldStringW is not implemented\n"); win_skip("FoldStringW is not implemented\n");
return; return;
} }
ok(!ret && GetLastError() == ERROR_INVALID_FLAGS, ok(!ret && GetLastError() == ERROR_INVALID_FLAGS,
...@@ -2299,7 +2299,7 @@ static void test_EnumUILanguageA(void) ...@@ -2299,7 +2299,7 @@ static void test_EnumUILanguageA(void)
{ {
BOOL ret; BOOL ret;
if (!pEnumUILanguagesA) { if (!pEnumUILanguagesA) {
skip("EnumUILanguagesA is not available on Win9x or NT4\n"); win_skip("EnumUILanguagesA is not available on Win9x or NT4\n");
return; return;
} }
......
...@@ -961,7 +961,7 @@ static void test_GetLongPathNameW(void) ...@@ -961,7 +961,7 @@ static void test_GetLongPathNameW(void)
length = pGetLongPathNameW(NULL,NULL,0); length = pGetLongPathNameW(NULL,NULL,0);
if (GetLastError() == ERROR_CALL_NOT_IMPLEMENTED) if (GetLastError() == ERROR_CALL_NOT_IMPLEMENTED)
{ {
skip("GetLongPathNameW is not implemented\n"); win_skip("GetLongPathNameW is not implemented\n");
return; return;
} }
ok(0==length,"GetLongPathNameW returned %d but expected 0\n",length); ok(0==length,"GetLongPathNameW returned %d but expected 0\n",length);
...@@ -990,7 +990,7 @@ static void test_GetShortPathNameW(void) ...@@ -990,7 +990,7 @@ static void test_GetShortPathNameW(void)
GetTempPathW( MAX_PATH, path ); GetTempPathW( MAX_PATH, path );
if (GetLastError() == ERROR_CALL_NOT_IMPLEMENTED) if (GetLastError() == ERROR_CALL_NOT_IMPLEMENTED)
{ {
skip("GetTempPathW is not implemented\n"); win_skip("GetTempPathW is not implemented\n");
return; return;
} }
......
...@@ -1409,7 +1409,7 @@ static void test_OpenProcess(void) ...@@ -1409,7 +1409,7 @@ static void test_OpenProcess(void)
/* not exported in all windows versions */ /* not exported in all windows versions */
if ((!pVirtualAllocEx) || (!pVirtualFreeEx)) { if ((!pVirtualAllocEx) || (!pVirtualFreeEx)) {
skip("VirtualAllocEx not found\n"); win_skip("VirtualAllocEx not found\n");
return; return;
} }
...@@ -1423,7 +1423,7 @@ static void test_OpenProcess(void) ...@@ -1423,7 +1423,7 @@ static void test_OpenProcess(void)
if (GetLastError() == ERROR_CALL_NOT_IMPLEMENTED) if (GetLastError() == ERROR_CALL_NOT_IMPLEMENTED)
{ /* Win9x */ { /* Win9x */
CloseHandle(hproc); CloseHandle(hproc);
skip("VirtualAllocEx not implemented\n"); win_skip("VirtualAllocEx not implemented\n");
return; return;
} }
ok(GetLastError() == ERROR_ACCESS_DENIED, "wrong error %d\n", GetLastError()); ok(GetLastError() == ERROR_ACCESS_DENIED, "wrong error %d\n", GetLastError());
......
...@@ -310,7 +310,7 @@ START_TEST(resource) ...@@ -310,7 +310,7 @@ START_TEST(resource)
if (GLE == ERROR_CALL_NOT_IMPLEMENTED) if (GLE == ERROR_CALL_NOT_IMPLEMENTED)
{ {
skip("Resource calls are not implemented\n"); win_skip("Resource calls are not implemented\n");
return; return;
} }
......
...@@ -54,7 +54,7 @@ static void test_signalandwait(void) ...@@ -54,7 +54,7 @@ static void test_signalandwait(void)
r = pSignalObjectAndWait(NULL, NULL, 0, 0); r = pSignalObjectAndWait(NULL, NULL, 0, 0);
if (r == ERROR_INVALID_FUNCTION) if (r == ERROR_INVALID_FUNCTION)
{ {
skip("SignalObjectAndWait is not implemented\n"); win_skip("SignalObjectAndWait is not implemented\n");
return; /* Win98/ME */ return; /* Win98/ME */
} }
ok( r == WAIT_FAILED, "should fail\n"); ok( r == WAIT_FAILED, "should fail\n");
...@@ -220,7 +220,7 @@ static void test_slist(void) ...@@ -220,7 +220,7 @@ static void test_slist(void)
pInterlockedPopEntrySList == NULL || pInterlockedPopEntrySList == NULL ||
pInterlockedPushEntrySList == NULL) pInterlockedPushEntrySList == NULL)
{ {
skip("some required slist entrypoints were not found, skipping tests\n"); win_skip("some required slist entrypoints were not found, skipping tests\n");
return; return;
} }
...@@ -393,7 +393,7 @@ static void test_waitable_timer(void) ...@@ -393,7 +393,7 @@ static void test_waitable_timer(void)
if (!pCreateWaitableTimerA || !pOpenWaitableTimerA) if (!pCreateWaitableTimerA || !pOpenWaitableTimerA)
{ {
skip("{Create,Open}WaitableTimerA() is not available\n"); win_skip("{Create,Open}WaitableTimerA() is not available\n");
return; return;
} }
...@@ -455,7 +455,7 @@ static void test_iocp_callback(void) ...@@ -455,7 +455,7 @@ static void test_iocp_callback(void)
p_BindIoCompletionCallback = (void*)GetProcAddress(hmod, "BindIoCompletionCallback"); p_BindIoCompletionCallback = (void*)GetProcAddress(hmod, "BindIoCompletionCallback");
if(!p_BindIoCompletionCallback) { if(!p_BindIoCompletionCallback) {
skip("BindIoCompletionCallback not found in this DLL\n"); win_skip("BindIoCompletionCallback not found in this DLL\n");
return; return;
} }
...@@ -645,7 +645,7 @@ static void test_timer_queue(void) ...@@ -645,7 +645,7 @@ static void test_timer_queue(void)
if (!pChangeTimerQueueTimer || !pCreateTimerQueue || !pCreateTimerQueueTimer if (!pChangeTimerQueueTimer || !pCreateTimerQueue || !pCreateTimerQueueTimer
|| !pDeleteTimerQueueEx || !pDeleteTimerQueueTimer) || !pDeleteTimerQueueEx || !pDeleteTimerQueueTimer)
{ {
skip("TimerQueue API not present\n"); win_skip("TimerQueue API not present\n");
return; return;
} }
......
...@@ -308,7 +308,7 @@ static VOID test_CreateRemoteThread(void) ...@@ -308,7 +308,7 @@ static VOID test_CreateRemoteThread(void)
hRemoteEvent, CREATE_SUSPENDED, &tid); hRemoteEvent, CREATE_SUSPENDED, &tid);
if (GetLastError() == ERROR_CALL_NOT_IMPLEMENTED) if (GetLastError() == ERROR_CALL_NOT_IMPLEMENTED)
{ {
skip("CreateRemoteThread is not implemented\n"); win_skip("CreateRemoteThread is not implemented\n");
goto cleanup; goto cleanup;
} }
ok(hThread != NULL, "CreateRemoteThread failed, err=%u\n", GetLastError()); ok(hThread != NULL, "CreateRemoteThread failed, err=%u\n", GetLastError());
...@@ -978,7 +978,7 @@ static void test_RegisterWaitForSingleObject(void) ...@@ -978,7 +978,7 @@ static void test_RegisterWaitForSingleObject(void)
if (!pRegisterWaitForSingleObject || !pUnregisterWait) if (!pRegisterWaitForSingleObject || !pUnregisterWait)
{ {
skip("RegisterWaitForSingleObject or UnregisterWait not implemented\n"); win_skip("RegisterWaitForSingleObject or UnregisterWait not implemented\n");
return; return;
} }
......
...@@ -294,7 +294,7 @@ static void test_GetTimeZoneInformation(void) ...@@ -294,7 +294,7 @@ static void test_GetTimeZoneInformation(void)
if (!pSystemTimeToTzSpecificLocalTime) if (!pSystemTimeToTzSpecificLocalTime)
{ {
skip("SystemTimeToTzSpecificLocalTime not present\n"); win_skip("SystemTimeToTzSpecificLocalTime not available\n");
return; return;
} }
...@@ -305,7 +305,7 @@ static void test_GetTimeZoneInformation(void) ...@@ -305,7 +305,7 @@ static void test_GetTimeZoneInformation(void)
res = pSystemTimeToTzSpecificLocalTime(&tzinfo, &utc, &current); res = pSystemTimeToTzSpecificLocalTime(&tzinfo, &utc, &current);
if (!res && GetLastError() == ERROR_CALL_NOT_IMPLEMENTED) if (!res && GetLastError() == ERROR_CALL_NOT_IMPLEMENTED)
{ {
skip("SystemTimeToTzSpecificLocalTime is not implemented\n"); win_skip("SystemTimeToTzSpecificLocalTime is not implemented\n");
return; return;
} }
...@@ -425,7 +425,7 @@ static void test_TzSpecificLocalTimeToSystemTime(void) ...@@ -425,7 +425,7 @@ static void test_TzSpecificLocalTimeToSystemTime(void)
if (!pTzSpecificLocalTimeToSystemTime || !pSystemTimeToTzSpecificLocalTime) if (!pTzSpecificLocalTimeToSystemTime || !pSystemTimeToTzSpecificLocalTime)
{ {
skip("TzSpecificLocalTimeToSystemTime or SystemTimeToTzSpecificLocalTime not present\n"); win_skip("TzSpecificLocalTimeToSystemTime or SystemTimeToTzSpecificLocalTime not available\n");
return; return;
} }
......
...@@ -39,14 +39,14 @@ static void test_timer(void) ...@@ -39,14 +39,14 @@ static void test_timer(void)
pCreateWaitableTimerA = (fnCreateWaitableTimerA) GetProcAddress( hker, "CreateWaitableTimerA"); pCreateWaitableTimerA = (fnCreateWaitableTimerA) GetProcAddress( hker, "CreateWaitableTimerA");
if( !pCreateWaitableTimerA ) if( !pCreateWaitableTimerA )
{ {
skip("CreateWaitableTimerA is not available\n"); win_skip("CreateWaitableTimerA is not available\n");
return; return;
} }
pSetWaitableTimer = (fnSetWaitableTimer) GetProcAddress( hker, "SetWaitableTimer"); pSetWaitableTimer = (fnSetWaitableTimer) GetProcAddress( hker, "SetWaitableTimer");
if( !pSetWaitableTimer ) if( !pSetWaitableTimer )
{ {
skip("SetWaitableTimer is not available\n"); win_skip("SetWaitableTimer is not available\n");
return; return;
} }
......
...@@ -305,7 +305,7 @@ START_TEST(toolhelp) ...@@ -305,7 +305,7 @@ START_TEST(toolhelp)
!pProcess32First || !pProcess32Next || !pProcess32First || !pProcess32Next ||
!pThread32First || !pThread32Next) !pThread32First || !pThread32Next)
{ {
skip("Needed functions are not available, most likely running on Windows NT\n"); win_skip("Needed functions are not available, most likely running on Windows NT\n");
return; return;
} }
......
...@@ -107,7 +107,7 @@ static void test_VerifyVersionInfo(void) ...@@ -107,7 +107,7 @@ static void test_VerifyVersionInfo(void)
if(!pVerifyVersionInfoA || !pVerSetConditionMask) if(!pVerifyVersionInfoA || !pVerSetConditionMask)
{ {
skip("Needed functions not available\n"); win_skip("Needed functions not available\n");
return; return;
} }
......
...@@ -66,7 +66,7 @@ static void test_VirtualAllocEx(void) ...@@ -66,7 +66,7 @@ static void test_VirtualAllocEx(void)
/* not exported in all windows-versions */ /* not exported in all windows-versions */
if ((!pVirtualAllocEx) || (!pVirtualFreeEx)) { if ((!pVirtualAllocEx) || (!pVirtualFreeEx)) {
skip("VirtualAllocEx not found\n"); win_skip("Virtual{Alloc,Free}Ex not available\n");
return; return;
} }
...@@ -78,7 +78,7 @@ static void test_VirtualAllocEx(void) ...@@ -78,7 +78,7 @@ static void test_VirtualAllocEx(void)
PAGE_EXECUTE_READWRITE); PAGE_EXECUTE_READWRITE);
if (!addr1 && GetLastError() == ERROR_CALL_NOT_IMPLEMENTED) if (!addr1 && GetLastError() == ERROR_CALL_NOT_IMPLEMENTED)
{ /* Win9x */ { /* Win9x */
skip("VirtualAllocEx not implemented\n"); win_skip("VirtualAllocEx not implemented\n");
TerminateProcess(hProcess, 0); TerminateProcess(hProcess, 0);
CloseHandle(hProcess); CloseHandle(hProcess);
return; return;
...@@ -703,7 +703,7 @@ static void test_NtMapViewOfSection(void) ...@@ -703,7 +703,7 @@ static void test_NtMapViewOfSection(void)
pNtUnmapViewOfSection = (void *)GetProcAddress( GetModuleHandle("ntdll.dll"), "NtUnmapViewOfSection" ); pNtUnmapViewOfSection = (void *)GetProcAddress( GetModuleHandle("ntdll.dll"), "NtUnmapViewOfSection" );
if (!pNtMapViewOfSection || !pNtUnmapViewOfSection) if (!pNtMapViewOfSection || !pNtUnmapViewOfSection)
{ {
skip( "NtMapViewOfSection not found\n" ); win_skip( "NtMapViewOfSection not available\n" );
return; return;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment