From 3e8f21c9c1f3cad1c27680c20f8b74a97c89fd41 Mon Sep 17 00:00:00 2001 From: Maarten Lankhorst Date: Wed, 7 May 2008 10:41:52 -0700 Subject: [PATCH] ntdll: Fix some exception tests to pass on windows --- dlls/ntdll/tests/exception.c | 12 ++++++++++-- 1 files changed, 10 insertions(+), 2 deletions(-) diff --git a/dlls/ntdll/tests/exception.c b/dlls/ntdll/tests/exception.c index d6168ee..8a6303a 100644 --- a/dlls/ntdll/tests/exception.c +++ b/dlls/ntdll/tests/exception.c @@ -105,7 +105,7 @@ static const struct exception /* test loading an invalid selector */ { { 0xb8, 0xef, 0xbe, 0x00, 0x00, 0x8e, 0xe8, 0xc3 }, /* mov $beef,%ax; mov %ax,%gs; ret */ - 5, 2, STATUS_ACCESS_VIOLATION, 2, { 0, 0xbee8 } }, + 5, 2, STATUS_ACCESS_VIOLATION, 2, { 0, 0xbee8 } }, /* 0xbee8 or 0xffffffff */ /* test accessing a zero selector */ { { 0x06, 0x31, 0xc0, 0x8e, 0xc0, 0x26, 0xa1, 0, 0, 0, 0, 0x07, 0xc3 }, @@ -358,6 +358,14 @@ static DWORD handler( EXCEPTION_RECORD *rec, EXCEPTION_REGISTRATION_RECORD *fram goto skip_params; } + /* Seems that both 0xbee8 and 0xfffffffff can be returned in windows */ + if (except->nb_params == 2 && rec->NumberParameters == 2 + && except->params[1] == 0xbee8 && rec->ExceptionInformation[1] == 0xffffffff + && except->params[0] == rec->ExceptionInformation[0]) + { + goto skip_params; + } + for (i = 0; i < rec->NumberParameters; i++) ok( rec->ExceptionInformation[i] == except->params[i], "%u: Wrong parameter %d: %lx/%x\n", @@ -485,7 +493,7 @@ static DWORD direction_flag_handler( EXCEPTION_RECORD *rec, EXCEPTION_REGISTRATI #ifdef __GNUC__ unsigned int flags; __asm__("pushfl; popl %0" : "=r" (flags) ); - ok( !(flags & 0x400), "eflags has DF bit set\n" ); +/* testing for DF bit in flags is useless as test results show it can be both */ #endif ok( context->EFlags & 0x400, "context eflags has DF bit cleared\n" ); got_exception++; -- 1.5.4.1