Alexandre Julliard : ntdll/tests: Fix some exception tests for Wow64.

Alexandre Julliard julliard at winehq.org
Tue Jun 22 10:49:33 CDT 2010


Module: wine
Branch: master
Commit: 0fdcab06ac5872637e57f2c5b6e1bf61ddf573c2
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=0fdcab06ac5872637e57f2c5b6e1bf61ddf573c2

Author: Alexandre Julliard <julliard at winehq.org>
Date:   Tue Jun 22 13:51:18 2010 +0200

ntdll/tests: Fix some exception tests for Wow64.

---

 dlls/ntdll/tests/exception.c |   15 ++++++++++-----
 1 files changed, 10 insertions(+), 5 deletions(-)

diff --git a/dlls/ntdll/tests/exception.c b/dlls/ntdll/tests/exception.c
index 154a7c7..598544e 100644
--- a/dlls/ntdll/tests/exception.c
+++ b/dlls/ntdll/tests/exception.c
@@ -143,9 +143,9 @@ static const struct exception
 /* 20 */
     /* test overlong instruction (limit is 15 bytes, 5 on Win7) */
     { { 0x64,0x64,0x64,0x64,0x64,0x64,0x64,0x64,0x64,0x64,0x64,0x64,0x64,0x64,0x64,0xfa,0xc3 },
-      0, 16, FALSE, STATUS_ILLEGAL_INSTRUCTION, 0 },
+      0, 16, TRUE, STATUS_ILLEGAL_INSTRUCTION, 0 },
     { { 0x64,0x64,0x64,0x64,0xfa,0xc3 },
-      0, 5, FALSE, STATUS_PRIVILEGED_INSTRUCTION, 0 },
+      0, 5, TRUE, STATUS_PRIVILEGED_INSTRUCTION, 0 },
 
     /* test invalid interrupt */
     { { 0xcd, 0xff, 0xc3 },   /* 21: int $0xff; ret */
@@ -246,7 +246,9 @@ static LONG CALLBACK rtlraiseexception_vectored_handler(EXCEPTION_POINTERS *Exce
        rec->ExceptionAddress, (char *)code_mem + 0xb);
 
     if (pNtCurrentTeb()->Peb->BeingDebugged)
-        ok((void *)context->Eax == pRtlRaiseException, "debugger managed to modify Eax to %x should be %p\n",
+        ok((void *)context->Eax == pRtlRaiseException ||
+           broken( is_wow64 && context->Eax == 0xf00f00f1 ), /* broken on vista */
+           "debugger managed to modify Eax to %x should be %p\n",
            context->Eax, pRtlRaiseException);
 
     /* check that context.Eip is fixed up only for EXCEPTION_BREAKPOINT
@@ -773,7 +775,9 @@ static void test_debugger(void)
                         /* ctx.Eip is the same value the exception handler got */
                         if (de.u.Exception.ExceptionRecord.ExceptionCode == EXCEPTION_BREAKPOINT)
                         {
-                            ok((char *)ctx.Eip == (char *)code_mem_address + 0xa, "Eip at 0x%x instead of %p\n",
+                            ok((char *)ctx.Eip == (char *)code_mem_address + 0xa ||
+                               broken(is_wow64 && (char *)ctx.Eip == (char *)code_mem_address + 0xb),
+                               "Eip at 0x%x instead of %p\n",
                                 ctx.Eip, (char *)code_mem_address + 0xa);
                             /* need to fixup Eip for debuggee */
                             if ((char *)ctx.Eip == (char *)code_mem_address + 0xa)
@@ -824,7 +828,8 @@ static DWORD simd_fault_handler( EXCEPTION_RECORD *rec, EXCEPTION_REGISTRATION_R
         ok( rec->ExceptionCode ==  STATUS_FLOAT_MULTIPLE_TRAPS,
             "exception code: %#x, should be %#x\n",
             rec->ExceptionCode,  STATUS_FLOAT_MULTIPLE_TRAPS);
-        ok( rec->NumberParameters == 1, "# of params: %i, should be 1\n",
+        ok( rec->NumberParameters == 1 || broken(is_wow64 && rec->NumberParameters == 2),
+            "# of params: %i, should be 1\n",
             rec->NumberParameters);
         if( rec->NumberParameters == 1 )
             ok( rec->ExceptionInformation[0] == 0, "param #1: %lx, should be 0\n", rec->ExceptionInformation[0]);




More information about the wine-cvs mailing list