mirror of
https://github.com/reactos/reactos.git
synced 2025-02-22 16:36:33 +00:00
[NTDLL_WINETEST] Unhack exception test and include it in x64
This removes the use of a precompiled header, as it causes problems with different usages of NONAMELESSUNION, which had to be hacked already, but this is still causing problems with GCC x64. It's just not worth the hassle to keep reactos specific hacks to save a few ms of compile time.
This commit is contained in:
parent
a656d23deb
commit
699041b221
4 changed files with 5 additions and 55 deletions
|
@ -8,6 +8,7 @@ list(APPEND SOURCE
|
||||||
directory.c
|
directory.c
|
||||||
env.c
|
env.c
|
||||||
error.c
|
error.c
|
||||||
|
exception.c
|
||||||
file.c
|
file.c
|
||||||
info.c
|
info.c
|
||||||
large_int.c
|
large_int.c
|
||||||
|
@ -21,20 +22,16 @@ list(APPEND SOURCE
|
||||||
rtlbitmap.c
|
rtlbitmap.c
|
||||||
rtlstr.c
|
rtlstr.c
|
||||||
string.c
|
string.c
|
||||||
|
testlist.c
|
||||||
time.c)
|
time.c)
|
||||||
|
|
||||||
if(ARCH STREQUAL "i386")
|
if(ARCH STREQUAL "i386")
|
||||||
list(APPEND SOURCE
|
list(APPEND SOURCE
|
||||||
exception.c
|
|
||||||
generated.c)
|
generated.c)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
list(APPEND PCH_SKIP_SOURCE
|
|
||||||
testlist.c)
|
|
||||||
|
|
||||||
add_executable(ntdll_winetest
|
add_executable(ntdll_winetest
|
||||||
${SOURCE}
|
${SOURCE})
|
||||||
${PCH_SKIP_SOURCE})
|
|
||||||
|
|
||||||
target_link_libraries(ntdll_winetest pseh)
|
target_link_libraries(ntdll_winetest pseh)
|
||||||
|
|
||||||
|
@ -49,5 +46,4 @@ endif()
|
||||||
|
|
||||||
set_module_type(ntdll_winetest win32cui)
|
set_module_type(ntdll_winetest win32cui)
|
||||||
add_importlibs(ntdll_winetest user32 ole32 advapi32 msvcrt kernel32 ntdll)
|
add_importlibs(ntdll_winetest user32 ole32 advapi32 msvcrt kernel32 ntdll)
|
||||||
add_pch(ntdll_winetest precomp.h "${PCH_SKIP_SOURCE}")
|
|
||||||
add_rostests_file(TARGET ntdll_winetest)
|
add_rostests_file(TARGET ntdll_winetest)
|
||||||
|
|
|
@ -1731,13 +1731,8 @@ static void call_virtual_unwind( int testnum, const struct unwind_test *test )
|
||||||
|
|
||||||
if (j == rsp) /* rsp is special */
|
if (j == rsp) /* rsp is special */
|
||||||
{
|
{
|
||||||
#ifndef __REACTOS__
|
|
||||||
ok( !ctx_ptr.u2.IntegerContext[j],
|
ok( !ctx_ptr.u2.IntegerContext[j],
|
||||||
"%u/%u: rsp should not be set in ctx_ptr\n", testnum, i );
|
"%u/%u: rsp should not be set in ctx_ptr\n", testnum, i );
|
||||||
#else
|
|
||||||
ok(!ctx_ptr.IntegerContext[j],
|
|
||||||
"%u/%u: rsp should not be set in ctx_ptr\n", testnum, i);
|
|
||||||
#endif // __REACTOS__
|
|
||||||
|
|
||||||
ok( context.Rsp == (ULONG64)fake_stack + test->results[i].regs[k][1],
|
ok( context.Rsp == (ULONG64)fake_stack + test->results[i].regs[k][1],
|
||||||
"%u/%u: register rsp wrong %p/%p\n",
|
"%u/%u: register rsp wrong %p/%p\n",
|
||||||
|
@ -1745,11 +1740,7 @@ static void call_virtual_unwind( int testnum, const struct unwind_test *test )
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifndef __REACTOS__
|
|
||||||
if (ctx_ptr.u2.IntegerContext[j])
|
if (ctx_ptr.u2.IntegerContext[j])
|
||||||
#else
|
|
||||||
if (ctx_ptr.IntegerContext[j])
|
|
||||||
#endif // __REACTOS__
|
|
||||||
{
|
{
|
||||||
ok( k < nb_regs, "%u/%u: register %s should not be set to %lx\n",
|
ok( k < nb_regs, "%u/%u: register %s should not be set to %lx\n",
|
||||||
testnum, i, reg_names[j], *(&context.Rax + j) );
|
testnum, i, reg_names[j], *(&context.Rax + j) );
|
||||||
|
@ -1961,7 +1952,6 @@ static void test_restore_context(void)
|
||||||
fltsave = &buf.Xmm6;
|
fltsave = &buf.Xmm6;
|
||||||
for (i = 0; i < 10; i++)
|
for (i = 0; i < 10; i++)
|
||||||
{
|
{
|
||||||
#ifndef __REACTOS__
|
|
||||||
ok(fltsave[i].Part[0] == ctx.u.FltSave.XmmRegisters[i + 6].Low,
|
ok(fltsave[i].Part[0] == ctx.u.FltSave.XmmRegisters[i + 6].Low,
|
||||||
"longjmp failed for Xmm%d, expected %lx, got %lx\n", i + 6,
|
"longjmp failed for Xmm%d, expected %lx, got %lx\n", i + 6,
|
||||||
fltsave[i].Part[0], ctx.u.FltSave.XmmRegisters[i + 6].Low);
|
fltsave[i].Part[0], ctx.u.FltSave.XmmRegisters[i + 6].Low);
|
||||||
|
@ -1969,15 +1959,6 @@ static void test_restore_context(void)
|
||||||
ok(fltsave[i].Part[1] == ctx.u.FltSave.XmmRegisters[i + 6].High,
|
ok(fltsave[i].Part[1] == ctx.u.FltSave.XmmRegisters[i + 6].High,
|
||||||
"longjmp failed for Xmm%d, expected %lx, got %lx\n", i + 6,
|
"longjmp failed for Xmm%d, expected %lx, got %lx\n", i + 6,
|
||||||
fltsave[i].Part[1], ctx.u.FltSave.XmmRegisters[i + 6].High);
|
fltsave[i].Part[1], ctx.u.FltSave.XmmRegisters[i + 6].High);
|
||||||
#else
|
|
||||||
ok(fltsave[i].Part[0] == ctx.FltSave.XmmRegisters[i + 6].Low,
|
|
||||||
"longjmp failed for Xmm%d, expected %lx, got %lx\n", i + 6,
|
|
||||||
fltsave[i].Part[0], ctx.FltSave.XmmRegisters[i + 6].Low);
|
|
||||||
|
|
||||||
ok(fltsave[i].Part[1] == ctx.FltSave.XmmRegisters[i + 6].High,
|
|
||||||
"longjmp failed for Xmm%d, expected %lx, got %lx\n", i + 6,
|
|
||||||
fltsave[i].Part[1], ctx.FltSave.XmmRegisters[i + 6].High);
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@ -2171,14 +2152,9 @@ static void test___C_specific_handler(void)
|
||||||
rec.ExceptionFlags = 2; /* EH_UNWINDING */
|
rec.ExceptionFlags = 2; /* EH_UNWINDING */
|
||||||
frame = 0x1234;
|
frame = 0x1234;
|
||||||
memset(&dispatch, 0, sizeof(dispatch));
|
memset(&dispatch, 0, sizeof(dispatch));
|
||||||
#ifndef __REACTOS__
|
|
||||||
dispatch.ImageBase = (ULONG_PTR)GetModuleHandleA(NULL);
|
dispatch.ImageBase = (ULONG_PTR)GetModuleHandleA(NULL);
|
||||||
dispatch.ControlPc = dispatch.ImageBase + 0x200;
|
dispatch.ControlPc = dispatch.ImageBase + 0x200;
|
||||||
#else
|
dispatch.HandlerData = &scope_table;
|
||||||
dispatch.ImageBase = GetModuleHandleA(NULL);
|
|
||||||
dispatch.ControlPc = (ULONG_PTR)dispatch.ImageBase + 0x200;
|
|
||||||
#endif
|
|
||||||
dispatch.HandlerData = &scope_table;
|
|
||||||
dispatch.ContextRecord = &context;
|
dispatch.ContextRecord = &context;
|
||||||
scope_table.Count = 1;
|
scope_table.Count = 1;
|
||||||
scope_table.ScopeRecord[0].BeginAddress = 0x200;
|
scope_table.ScopeRecord[0].BeginAddress = 0x200;
|
||||||
|
@ -2712,7 +2688,7 @@ START_TEST(exception)
|
||||||
HMODULE hmsvcrt = LoadLibraryA("msvcrt.dll");
|
HMODULE hmsvcrt = LoadLibraryA("msvcrt.dll");
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef __REACTOS__
|
#if defined(__REACTOS__) && !defined(_M_AMD64)
|
||||||
if (!winetest_interactive &&
|
if (!winetest_interactive &&
|
||||||
!strcmp(winetest_platform, "windows"))
|
!strcmp(winetest_platform, "windows"))
|
||||||
{
|
{
|
||||||
|
|
|
@ -1,20 +0,0 @@
|
||||||
|
|
||||||
#ifndef _NTDLL_WINETEST_PRECOMP_H_
|
|
||||||
#define _NTDLL_WINETEST_PRECOMP_H_
|
|
||||||
|
|
||||||
#include <stdio.h>
|
|
||||||
#include <ntstatus.h>
|
|
||||||
|
|
||||||
#define WIN32_NO_STATUS
|
|
||||||
#define _INC_WINDOWS
|
|
||||||
#define COM_NO_WINDOWS_H
|
|
||||||
|
|
||||||
#define COBJMACROS
|
|
||||||
|
|
||||||
#include "ntdll_test.h"
|
|
||||||
|
|
||||||
#include <winuser.h>
|
|
||||||
#include <winnls.h>
|
|
||||||
#include <winioctl.h>
|
|
||||||
|
|
||||||
#endif /* !_NTDLL_WINETEST_PRECOMP_H_ */
|
|
|
@ -32,9 +32,7 @@ const struct test winetest_testlist[] =
|
||||||
{ "directory", func_directory },
|
{ "directory", func_directory },
|
||||||
{ "env", func_env },
|
{ "env", func_env },
|
||||||
{ "error", func_error },
|
{ "error", func_error },
|
||||||
#ifdef _M_IX86
|
|
||||||
{ "exception", func_exception },
|
{ "exception", func_exception },
|
||||||
#endif
|
|
||||||
{ "file", func_file },
|
{ "file", func_file },
|
||||||
#ifdef _M_IX86
|
#ifdef _M_IX86
|
||||||
{ "generated", func_generated },
|
{ "generated", func_generated },
|
||||||
|
|
Loading…
Reference in a new issue