kernel32/tests: Skip some debugger tests on 64-bit.

This commit is contained in:
Greg Geldorp 2010-12-30 16:31:16 +01:00 committed by Alexandre Julliard
parent 1019f2f14f
commit f284719c96

View file

@ -266,6 +266,7 @@ static void doDebugger(int argc, char** argv)
static void crash_and_debug(HKEY hkey, const char* argv0, const char* dbgtasks)
{
static BOOL skip_crash_and_debug = FALSE;
DWORD ret;
HANDLE start_event, done_event;
char* cmd;
@ -276,6 +277,13 @@ static void crash_and_debug(HKEY hkey, const char* argv0, const char* dbgtasks)
DWORD exit_code;
crash_blackbox_t crash_blackbox;
debugger_blackbox_t dbg_blackbox;
DWORD wait_code;
if (skip_crash_and_debug)
{
win_skip("Skipping crash_and_debug\n");
return;
}
ret=RegSetValueExA(hkey, "auto", 0, REG_SZ, (BYTE*)"1", 2);
ok(ret == ERROR_SUCCESS, "unable to set AeDebug/auto: ret=%d\n", ret);
@ -303,7 +311,22 @@ static void crash_and_debug(HKEY hkey, const char* argv0, const char* dbgtasks)
/* The process exits... */
trace("waiting for child exit...\n");
ok(WaitForSingleObject(info.hProcess, 60000) == WAIT_OBJECT_0, "Timed out waiting for the child to crash\n");
wait_code = WaitForSingleObject(info.hProcess, 30000);
#if defined(_WIN64) && defined(__MINGW32__)
/* Mingw x64 doesn't output proper unwind info */
skip_crash_and_debug = broken(wait_code == WAIT_TIMEOUT);
if (skip_crash_and_debug)
{
TerminateProcess(info.hProcess, WAIT_TIMEOUT);
WaitForSingleObject(info.hProcess, 5000);
CloseHandle(info.hProcess);
assert(DeleteFileA(dbglog) != 0);
assert(DeleteFileA(childlog) != 0);
win_skip("Giving up on child process\n");
return;
}
#endif
ok(wait_code == WAIT_OBJECT_0, "Timed out waiting for the child to crash\n");
ok(GetExitCodeProcess(info.hProcess, &exit_code), "GetExitCodeProcess failed: err=%d\n", GetLastError());
if (strstr(dbgtasks, "code2"))
{
@ -328,7 +351,19 @@ static void crash_and_debug(HKEY hkey, const char* argv0, const char* dbgtasks)
ok(SetEvent(start_event), "SetEvent(start_event) failed\n");
trace("waiting for the debugger...\n");
ok(WaitForSingleObject(done_event, 60000) == WAIT_OBJECT_0, "Timed out waiting for the debugger\n");
wait_code = WaitForSingleObject(done_event, 5000);
#if defined(_WIN64) && defined(__MINGW32__)
/* Mingw x64 doesn't output proper unwind info */
skip_crash_and_debug = broken(wait_code == WAIT_TIMEOUT);
if (skip_crash_and_debug)
{
assert(DeleteFileA(dbglog) != 0);
assert(DeleteFileA(childlog) != 0);
win_skip("Giving up on debugger\n");
return;
}
#endif
ok(wait_code == WAIT_OBJECT_0, "Timed out waiting for the debugger\n");
assert(load_blackbox(childlog, &crash_blackbox, sizeof(crash_blackbox)));
assert(load_blackbox(dbglog, &dbg_blackbox, sizeof(dbg_blackbox)));