mirror of
https://github.com/reactos/reactos.git
synced 2025-08-07 05:52:57 +00:00
-sync kernel32_winetest with wine 1.1.32
svn path=/trunk/; revision=43744
This commit is contained in:
parent
01a9e7493e
commit
abc34f7dad
15 changed files with 451 additions and 295 deletions
|
@ -34,6 +34,7 @@
|
|||
static int myARGC;
|
||||
static char** myARGV;
|
||||
|
||||
static BOOL (WINAPI *pCheckRemoteDebuggerPresent)(HANDLE,PBOOL);
|
||||
static BOOL (WINAPI *pDebugActiveProcessStop)(DWORD);
|
||||
static BOOL (WINAPI *pDebugSetProcessKillOnExit)(BOOL);
|
||||
|
||||
|
@ -283,6 +284,7 @@ static void crash_and_debug(HKEY hkey, const char* argv0, const char* dbgtasks)
|
|||
* detaching, then the debuggee gets a special exit code.
|
||||
*/
|
||||
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);
|
||||
|
@ -433,11 +435,42 @@ static void test_ExitCode(void)
|
|||
}
|
||||
}
|
||||
|
||||
static void test_RemoteDebugger(void)
|
||||
{
|
||||
BOOL bret, present;
|
||||
if(!pCheckRemoteDebuggerPresent)
|
||||
{
|
||||
win_skip("CheckRemoteDebuggerPresent is not available\n");
|
||||
return;
|
||||
}
|
||||
present = TRUE;
|
||||
SetLastError(0xdeadbeef);
|
||||
bret = pCheckRemoteDebuggerPresent(GetCurrentProcess(),&present);
|
||||
ok(bret , "expected CheckRemoteDebuggerPresent to succeed\n");
|
||||
ok(0xdeadbeef == GetLastError(),
|
||||
"expected error to be unchanged, got %d/%x\n",GetLastError(), GetLastError());
|
||||
|
||||
present = TRUE;
|
||||
SetLastError(0xdeadbeef);
|
||||
bret = pCheckRemoteDebuggerPresent(NULL,&present);
|
||||
ok(!bret , "expected CheckRemoteDebuggerPresent to fail\n");
|
||||
ok(present, "expected parameter to be unchanged\n");
|
||||
ok(ERROR_INVALID_PARAMETER == GetLastError(),
|
||||
"expected error ERROR_INVALID_PARAMETER, got %d/%x\n",GetLastError(), GetLastError());
|
||||
|
||||
SetLastError(0xdeadbeef);
|
||||
bret = pCheckRemoteDebuggerPresent(GetCurrentProcess(),NULL);
|
||||
ok(!bret , "expected CheckRemoteDebuggerPresent to fail\n");
|
||||
ok(ERROR_INVALID_PARAMETER == GetLastError(),
|
||||
"expected error ERROR_INVALID_PARAMETER, got %d/%x\n",GetLastError(), GetLastError());
|
||||
}
|
||||
|
||||
START_TEST(debugger)
|
||||
{
|
||||
HMODULE hdll;
|
||||
|
||||
hdll=GetModuleHandle("kernel32.dll");
|
||||
pCheckRemoteDebuggerPresent=(void*)GetProcAddress(hdll, "CheckRemoteDebuggerPresent");
|
||||
pDebugActiveProcessStop=(void*)GetProcAddress(hdll, "DebugActiveProcessStop");
|
||||
pDebugSetProcessKillOnExit=(void*)GetProcAddress(hdll, "DebugSetProcessKillOnExit");
|
||||
|
||||
|
@ -453,5 +486,6 @@ START_TEST(debugger)
|
|||
else
|
||||
{
|
||||
test_ExitCode();
|
||||
test_RemoteDebugger();
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue