[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:
Timo Kreuzer 2021-07-09 10:58:15 +02:00
parent a656d23deb
commit 699041b221
4 changed files with 5 additions and 55 deletions

View file

@ -8,6 +8,7 @@ list(APPEND SOURCE
directory.c
env.c
error.c
exception.c
file.c
info.c
large_int.c
@ -21,20 +22,16 @@ list(APPEND SOURCE
rtlbitmap.c
rtlstr.c
string.c
testlist.c
time.c)
if(ARCH STREQUAL "i386")
list(APPEND SOURCE
exception.c
generated.c)
endif()
list(APPEND PCH_SKIP_SOURCE
testlist.c)
add_executable(ntdll_winetest
${SOURCE}
${PCH_SKIP_SOURCE})
${SOURCE})
target_link_libraries(ntdll_winetest pseh)
@ -49,5 +46,4 @@ endif()
set_module_type(ntdll_winetest win32cui)
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)

View file

@ -1731,13 +1731,8 @@ static void call_virtual_unwind( int testnum, const struct unwind_test *test )
if (j == rsp) /* rsp is special */
{
#ifndef __REACTOS__
ok( !ctx_ptr.u2.IntegerContext[j],
"%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],
"%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;
}
#ifndef __REACTOS__
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",
testnum, i, reg_names[j], *(&context.Rax + j) );
@ -1961,7 +1952,6 @@ static void test_restore_context(void)
fltsave = &buf.Xmm6;
for (i = 0; i < 10; i++)
{
#ifndef __REACTOS__
ok(fltsave[i].Part[0] == ctx.u.FltSave.XmmRegisters[i + 6].Low,
"longjmp failed for Xmm%d, expected %lx, got %lx\n", i + 6,
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,
"longjmp failed for Xmm%d, expected %lx, got %lx\n", i + 6,
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
@ -2171,14 +2152,9 @@ static void test___C_specific_handler(void)
rec.ExceptionFlags = 2; /* EH_UNWINDING */
frame = 0x1234;
memset(&dispatch, 0, sizeof(dispatch));
#ifndef __REACTOS__
dispatch.ImageBase = (ULONG_PTR)GetModuleHandleA(NULL);
dispatch.ControlPc = dispatch.ImageBase + 0x200;
#else
dispatch.ImageBase = GetModuleHandleA(NULL);
dispatch.ControlPc = (ULONG_PTR)dispatch.ImageBase + 0x200;
#endif
dispatch.HandlerData = &scope_table;
dispatch.HandlerData = &scope_table;
dispatch.ContextRecord = &context;
scope_table.Count = 1;
scope_table.ScopeRecord[0].BeginAddress = 0x200;
@ -2712,7 +2688,7 @@ START_TEST(exception)
HMODULE hmsvcrt = LoadLibraryA("msvcrt.dll");
#endif
#ifdef __REACTOS__
#if defined(__REACTOS__) && !defined(_M_AMD64)
if (!winetest_interactive &&
!strcmp(winetest_platform, "windows"))
{

View file

@ -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_ */

View file

@ -32,9 +32,7 @@ const struct test winetest_testlist[] =
{ "directory", func_directory },
{ "env", func_env },
{ "error", func_error },
#ifdef _M_IX86
{ "exception", func_exception },
#endif
{ "file", func_file },
#ifdef _M_IX86
{ "generated", func_generated },