Alexandre Julliard : ntdll/tests: Skip the debugger test if the child process is not loaded at the right address .
Alexandre Julliard
julliard at winehq.org
Thu Sep 20 10:30:11 CDT 2007
Module: wine
Branch: master
Commit: 088e27c849190584b36ae0fe19afa818b5579018
URL: http://source.winehq.org/git/wine.git/?a=commit;h=088e27c849190584b36ae0fe19afa818b5579018
Author: Alexandre Julliard <julliard at winehq.org>
Date: Thu Sep 20 17:01:31 2007 +0200
ntdll/tests: Skip the debugger test if the child process is not loaded at the right address.
---
dlls/ntdll/tests/exception.c | 15 ++++++++++++---
1 files changed, 12 insertions(+), 3 deletions(-)
diff --git a/dlls/ntdll/tests/exception.c b/dlls/ntdll/tests/exception.c
index 8afbc81..ce5d31b 100644
--- a/dlls/ntdll/tests/exception.c
+++ b/dlls/ntdll/tests/exception.c
@@ -596,7 +596,7 @@ static void test_debugger(void)
return;
}
- sprintf(cmdline, "%s %s %s", my_argv[0], my_argv[1], "debuggee");
+ sprintf(cmdline, "%s %s %s %p", my_argv[0], my_argv[1], "debuggee", &test_stage);
ret = CreateProcess(NULL, cmdline, NULL, NULL, FALSE, DEBUG_PROCESS, NULL, NULL, &si, &pi);
ok(ret, "could not create child process error: %u\n", GetLastError());
if (!ret)
@@ -699,7 +699,7 @@ static void test_debugger(void)
}
}
else
- ok(FALSE, "unexpected stage %d\n", stage);
+ ok(FALSE, "unexpected stage %x\n", stage);
status = pNtSetContextThread(pi.hThread, &ctx);
ok(!status, "NtSetContextThread failed with 0x%x\n", status);
@@ -828,8 +828,17 @@ START_TEST(exception)
}
my_argc = winetest_get_mainargs( &my_argv );
- if (my_argc >= 3)
+ if (my_argc >= 4)
{
+ void *addr;
+ sscanf( my_argv[3], "%p", &addr );
+
+ if (addr != &test_stage)
+ {
+ skip( "child process not mapped at same address (%p/%p)\n", &test_stage, addr);
+ return;
+ }
+
/* child must be run under a debugger */
if (!pNtCurrentTeb()->Peb->BeingDebugged)
{
More information about the wine-cvs
mailing list