https://git.reactos.org/?p=reactos.git;a=commitdiff;h=699041b2214ec0c59e589…
commit 699041b2214ec0c59e5898e65616ad6cfb7febb1
Author: Timo Kreuzer <timo.kreuzer(a)reactos.org>
AuthorDate: Fri Jul 9 10:58:15 2021 +0200
Commit: Timo Kreuzer <timo.kreuzer(a)reactos.org>
CommitDate: Sat Jul 10 18:41:12 2021 +0200
[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.
---
modules/rostests/winetests/ntdll/CMakeLists.txt | 10 +++------
modules/rostests/winetests/ntdll/exception.c | 28 ++-----------------------
modules/rostests/winetests/ntdll/precomp.h | 20 ------------------
modules/rostests/winetests/ntdll/testlist.c | 2 --
4 files changed, 5 insertions(+), 55 deletions(-)
diff --git a/modules/rostests/winetests/ntdll/CMakeLists.txt
b/modules/rostests/winetests/ntdll/CMakeLists.txt
index f7b435eee5a..b835ed34331 100644
--- a/modules/rostests/winetests/ntdll/CMakeLists.txt
+++ b/modules/rostests/winetests/ntdll/CMakeLists.txt
@@ -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)
diff --git a/modules/rostests/winetests/ntdll/exception.c
b/modules/rostests/winetests/ntdll/exception.c
index 142913f7db1..3074646858b 100644
--- a/modules/rostests/winetests/ntdll/exception.c
+++ b/modules/rostests/winetests/ntdll/exception.c
@@ -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"))
{
diff --git a/modules/rostests/winetests/ntdll/precomp.h
b/modules/rostests/winetests/ntdll/precomp.h
deleted file mode 100644
index 1f8e9ce5524..00000000000
--- a/modules/rostests/winetests/ntdll/precomp.h
+++ /dev/null
@@ -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_ */
diff --git a/modules/rostests/winetests/ntdll/testlist.c
b/modules/rostests/winetests/ntdll/testlist.c
index fb64074ac4f..989040c562a 100644
--- a/modules/rostests/winetests/ntdll/testlist.c
+++ b/modules/rostests/winetests/ntdll/testlist.c
@@ -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 },