kernel32/tests: Remove win9x hacks.
This commit is contained in:
parent
2d8ad31e22
commit
e2cbe25ba7
|
@ -192,26 +192,16 @@ static void test_get_atom_name(void)
|
|||
else
|
||||
ok( !len, "bad length %d\n", len );
|
||||
|
||||
SetLastError(0xdeadbeef);
|
||||
SetLastError(0xdeadbeef);
|
||||
len = GlobalGetAtomNameA( (ATOM)i, buf, 2);
|
||||
if (!len) /* the NT way */
|
||||
{
|
||||
ok(GetLastError() == (i ? ERROR_MORE_DATA : ERROR_INVALID_PARAMETER) ||
|
||||
GetLastError() == 0xdeadbeef, /* the Win 9x way */
|
||||
"wrong error conditions %u for %u\n", GetLastError(), i);
|
||||
}
|
||||
else /* the Win 9x way */
|
||||
{
|
||||
ok(GetLastError() == 0xdeadbeef,
|
||||
"wrong error conditions %u for %u\n", GetLastError(), i);
|
||||
}
|
||||
ok(!len, "bad length %d\n", len);
|
||||
ok(GetLastError() == ERROR_MORE_DATA || GetLastError() == ERROR_INVALID_PARAMETER,
|
||||
"wrong error conditions %u for %u\n", GetLastError(), i);
|
||||
}
|
||||
|
||||
memset( buf, '.', sizeof(buf) );
|
||||
len = GlobalGetAtomNameA( atom, buf, 6 );
|
||||
ok( len == 0 ||
|
||||
len == 5, /* win9x */
|
||||
"bad length %d\n", len );
|
||||
ok( len == 0, "bad length %d\n", len );
|
||||
ok( !memcmp( buf, "fooba\0....", 10 ), "bad buffer contents\n");
|
||||
if (unicode_OS)
|
||||
{
|
||||
|
@ -238,14 +228,8 @@ static void test_get_atom_name(void)
|
|||
memset(out, '.', sizeof(out));
|
||||
SetLastError(0xdeadbeef);
|
||||
len = GlobalGetAtomNameA(atom, out, 10);
|
||||
if (!len) /* the NT way */
|
||||
{
|
||||
ok(GetLastError() == ERROR_MORE_DATA, "wrong error code (%u instead of %u)\n", GetLastError(), ERROR_MORE_DATA);
|
||||
}
|
||||
else /* the Win9x way */
|
||||
{
|
||||
ok(GetLastError() == 0xdeadbeef, "wrong error code (%u instead of %u)\n", GetLastError(), 0xdeadbeef);
|
||||
}
|
||||
ok(!len, "bad length %d\n", len);
|
||||
ok(GetLastError() == ERROR_MORE_DATA, "wrong error code (%u instead of %u)\n", GetLastError(), ERROR_MORE_DATA);
|
||||
for (i = 0; i < 9; i++)
|
||||
{
|
||||
ok(out[i] == "abcdefghij"[i % 10], "wrong string at %i (%c instead of %c)\n", i, out[i], "abcdefghij"[i % 10]);
|
||||
|
@ -487,13 +471,11 @@ static void test_local_get_atom_name(void)
|
|||
/* ERROR_MORE_DATA is on nt3.51 sp5 */
|
||||
if (i)
|
||||
ok(GetLastError() == ERROR_INSUFFICIENT_BUFFER ||
|
||||
GetLastError() == ERROR_MORE_DATA ||
|
||||
GetLastError() == 0xdeadbeef, /* the Win 9x way */
|
||||
GetLastError() == ERROR_MORE_DATA,
|
||||
"wrong error conditions %u for %u\n", GetLastError(), i);
|
||||
else
|
||||
ok(GetLastError() == ERROR_INVALID_PARAMETER ||
|
||||
GetLastError() == ERROR_MORE_DATA ||
|
||||
GetLastError() == 0xdeadbeef, /* the Win 9x way */
|
||||
GetLastError() == ERROR_MORE_DATA,
|
||||
"wrong error conditions %u for %u\n", GetLastError(), i);
|
||||
}
|
||||
/* test string limits & overflow */
|
||||
|
@ -522,8 +504,7 @@ static void test_local_get_atom_name(void)
|
|||
|
||||
/* ERROR_MORE_DATA is on nt3.51 sp5 */
|
||||
ok(GetLastError() == ERROR_INVALID_PARAMETER ||
|
||||
GetLastError() == ERROR_MORE_DATA ||
|
||||
GetLastError() == 0xdeadbeef, /* the Win 9x way */
|
||||
GetLastError() == ERROR_MORE_DATA,
|
||||
"wrong error code (%u)\n", GetLastError());
|
||||
|
||||
if (unicode_OS)
|
||||
|
|
|
@ -337,14 +337,12 @@ static void crash_and_debug(HKEY hkey, const char* argv0, const char* dbgtasks)
|
|||
*/
|
||||
ok(exit_code == STATUS_DEBUGGER_INACTIVE ||
|
||||
broken(exit_code == STATUS_ACCESS_VIOLATION) || /* Intermittent Vista+ */
|
||||
broken(exit_code == 0xffffffff) || /* Win9x */
|
||||
broken(exit_code == WAIT_ABANDONED), /* NT4, W2K */
|
||||
"wrong exit code : %08x\n", exit_code);
|
||||
}
|
||||
else
|
||||
ok(exit_code == STATUS_ACCESS_VIOLATION ||
|
||||
broken(exit_code == WAIT_ABANDONED) || /* NT4, W2K, W2K3 */
|
||||
broken(exit_code == 0xffffffff), /* Win9x, WinME */
|
||||
broken(exit_code == WAIT_ABANDONED), /* NT4, W2K, W2K3 */
|
||||
"wrong exit code : %08x\n", exit_code);
|
||||
CloseHandle(info.hProcess);
|
||||
|
||||
|
@ -478,10 +476,8 @@ static void test_ExitCode(void)
|
|||
crash_and_debug(hkey, test_exe, "dbg,none");
|
||||
else
|
||||
skip("\"none\" debugger test needs user interaction\n");
|
||||
if (disposition == REG_CREATED_NEW_KEY)
|
||||
win_skip("'dbg,event,order' test doesn't finish on Win9x/WinMe\n");
|
||||
else
|
||||
crash_and_debug(hkey, test_exe, "dbg,event,order");
|
||||
ok(disposition == REG_OPENED_EXISTING_KEY, "expected REG_OPENED_EXISTING_KEY, got %d\n", disposition);
|
||||
crash_and_debug(hkey, test_exe, "dbg,event,order");
|
||||
crash_and_debug(hkey, test_exe, "dbg,attach,event,code2");
|
||||
if (pDebugSetProcessKillOnExit)
|
||||
crash_and_debug(hkey, test_exe, "dbg,attach,event,nokill");
|
||||
|
|
|
@ -149,16 +149,12 @@ static void test_mutex(void)
|
|||
SetLastError(0xdeadbeef);
|
||||
hOpened = OpenMutex(READ_CONTROL, FALSE, "WINETESTMUTEX");
|
||||
ok(!hOpened, "OpenMutex succeeded\n");
|
||||
ok(GetLastError() == ERROR_FILE_NOT_FOUND ||
|
||||
GetLastError() == ERROR_INVALID_NAME, /* win9x */
|
||||
"wrong error %u\n", GetLastError());
|
||||
ok(GetLastError() == ERROR_FILE_NOT_FOUND, "wrong error %u\n", GetLastError());
|
||||
|
||||
SetLastError(0xdeadbeef);
|
||||
hOpened = OpenMutex(READ_CONTROL, FALSE, "winetestmutex");
|
||||
ok(!hOpened, "OpenMutex succeeded\n");
|
||||
ok(GetLastError() == ERROR_FILE_NOT_FOUND ||
|
||||
GetLastError() == ERROR_INVALID_NAME, /* win9x */
|
||||
"wrong error %u\n", GetLastError());
|
||||
ok(GetLastError() == ERROR_FILE_NOT_FOUND, "wrong error %u\n", GetLastError());
|
||||
|
||||
SetLastError(0xdeadbeef);
|
||||
hOpened = CreateMutex(NULL, FALSE, "WineTestMutex");
|
||||
|
@ -328,9 +324,7 @@ static void test_event(void)
|
|||
SetLastError(0xdeadbeef);
|
||||
handle2 = OpenEventA( EVENT_ALL_ACCESS, FALSE, __FILE__ ": TEST EVENT");
|
||||
ok( !handle2, "OpenEvent succeeded\n");
|
||||
ok( GetLastError() == ERROR_FILE_NOT_FOUND ||
|
||||
GetLastError() == ERROR_INVALID_NAME, /* win9x */
|
||||
"wrong error %u\n", GetLastError());
|
||||
ok( GetLastError() == ERROR_FILE_NOT_FOUND, "wrong error %u\n", GetLastError());
|
||||
|
||||
CloseHandle( handle );
|
||||
}
|
||||
|
@ -366,9 +360,7 @@ static void test_semaphore(void)
|
|||
SetLastError(0xdeadbeef);
|
||||
handle2 = OpenSemaphoreA( SEMAPHORE_ALL_ACCESS, FALSE, __FILE__ ": TEST SEMAPHORE");
|
||||
ok( !handle2, "OpenSemaphore succeeded\n");
|
||||
ok( GetLastError() == ERROR_FILE_NOT_FOUND ||
|
||||
GetLastError() == ERROR_INVALID_NAME, /* win9x */
|
||||
"wrong error %u\n", GetLastError());
|
||||
ok( GetLastError() == ERROR_FILE_NOT_FOUND, "wrong error %u\n", GetLastError());
|
||||
|
||||
CloseHandle( handle );
|
||||
}
|
||||
|
@ -938,11 +930,6 @@ static void test_WaitForSingleObject(void)
|
|||
DWORD ret;
|
||||
|
||||
signaled = CreateEventW(NULL, TRUE, TRUE, NULL);
|
||||
if(signaled == 0 && GetLastError() == ERROR_CALL_NOT_IMPLEMENTED)
|
||||
{
|
||||
win_skip("Handles work differently on win9x\n");
|
||||
return;
|
||||
}
|
||||
nonsignaled = CreateEventW(NULL, TRUE, FALSE, NULL);
|
||||
invalid = (HANDLE) 0xdeadbee0;
|
||||
|
||||
|
|
Loading…
Reference in New Issue