kernel32/tests: Fix a few failures on win98.
This commit is contained in:
parent
bdde87f04a
commit
5737fb815c
|
@ -372,6 +372,7 @@ static VOID test_CreateThread_basic(void)
|
|||
int error;
|
||||
DWORD i,j;
|
||||
DWORD GLE, ret;
|
||||
DWORD tid;
|
||||
|
||||
/* lstrlenA contains an exception handler so this makes sure exceptions work in the main thread */
|
||||
ok( lstrlenA( (char *)0xdeadbeef ) == 0, "lstrlenA: unexpected success\n" );
|
||||
|
@ -429,7 +430,7 @@ static VOID test_CreateThread_basic(void)
|
|||
|
||||
/* Test how passing NULL as a pointer to threadid works */
|
||||
SetLastError(0xFACEaBAD);
|
||||
thread[0] = CreateThread(NULL,0,threadFunc2,NULL,0,NULL);
|
||||
thread[0] = CreateThread(NULL,0,threadFunc2,NULL,0,&tid);
|
||||
GLE = GetLastError();
|
||||
if (thread[0]) { /* NT */
|
||||
ok(GLE==0xFACEaBAD, "CreateThread set last error to %d, expected 4207848365\n", GLE);
|
||||
|
@ -1125,7 +1126,7 @@ static DWORD WINAPI TLS_ThreadProc(LPVOID p)
|
|||
if (sync_threads_and_run_one(0, id))
|
||||
{
|
||||
HANDLE thread;
|
||||
DWORD waitret;
|
||||
DWORD waitret, tid;
|
||||
|
||||
val = TlsGetValue(TLS_index0);
|
||||
ok(GetLastError() == ERROR_SUCCESS, "TlsGetValue failed\n");
|
||||
|
@ -1135,7 +1136,7 @@ static DWORD WINAPI TLS_ThreadProc(LPVOID p)
|
|||
ok(GetLastError() == ERROR_SUCCESS, "TlsGetValue failed\n");
|
||||
ok(val == (LPVOID) 2, "TLS slot not initialized correctly\n");
|
||||
|
||||
thread = CreateThread(NULL, 0, TLS_InheritanceProc, 0, 0, NULL);
|
||||
thread = CreateThread(NULL, 0, TLS_InheritanceProc, 0, 0, &tid);
|
||||
ok(thread != NULL, "CreateThread failed\n");
|
||||
waitret = WaitForSingleObject(thread, 60000);
|
||||
ok(waitret == WAIT_OBJECT_0, "WaitForSingleObject failed\n");
|
||||
|
@ -1173,7 +1174,9 @@ static void test_TLS(void)
|
|||
|
||||
for (i = 0; i < 2; ++i)
|
||||
{
|
||||
threads[i] = CreateThread(NULL, 0, TLS_ThreadProc, (LPVOID) i, 0, NULL);
|
||||
DWORD tid;
|
||||
|
||||
threads[i] = CreateThread(NULL, 0, TLS_ThreadProc, (LPVOID) i, 0, &tid);
|
||||
ok(threads[i] != NULL, "CreateThread failed\n");
|
||||
}
|
||||
|
||||
|
@ -1221,7 +1224,8 @@ START_TEST(thread)
|
|||
while (1)
|
||||
{
|
||||
HANDLE hThread;
|
||||
hThread = CreateThread(NULL, 0, threadFunc2, NULL, 0, NULL);
|
||||
DWORD tid;
|
||||
hThread = CreateThread(NULL, 0, threadFunc2, NULL, 0, &tid);
|
||||
ok(hThread != NULL, "CreateThread failed, error %u\n",
|
||||
GetLastError());
|
||||
ok(WaitForSingleObject(hThread, 200) == WAIT_OBJECT_0,
|
||||
|
|
Loading…
Reference in New Issue