Paul Vriens : ntdll/tests: Do GetModuleHandle only once and add a few
skip' s.
Alexandre Julliard
julliard at wine.codeweavers.com
Tue Aug 21 07:21:00 CDT 2007
Module: wine
Branch: master
Commit: 9783ce360e6cb180c5113f7dcbdf006bb2b93e17
URL: http://source.winehq.org/git/wine.git/?a=commit;h=9783ce360e6cb180c5113f7dcbdf006bb2b93e17
Author: Paul Vriens <paul.vriens.wine at gmail.com>
Date: Tue Aug 21 11:28:25 2007 +0200
ntdll/tests: Do GetModuleHandle only once and add a few skip's.
---
dlls/ntdll/tests/exception.c | 22 ++++++++++++----------
1 files changed, 12 insertions(+), 10 deletions(-)
diff --git a/dlls/ntdll/tests/exception.c b/dlls/ntdll/tests/exception.c
index c59a5bb..8afbc81 100644
--- a/dlls/ntdll/tests/exception.c
+++ b/dlls/ntdll/tests/exception.c
@@ -537,7 +537,7 @@ static void test_exceptions(void)
if (!pNtGetContextThread || !pNtSetContextThread)
{
- trace( "NtGetContextThread/NtSetContextThread not found, skipping tests\n" );
+ skip( "NtGetContextThread/NtSetContextThread not found\n" );
return;
}
@@ -797,19 +797,21 @@ static void test_simd_exceptions(void)
START_TEST(exception)
{
#ifdef __i386__
- pNtCurrentTeb = (void *)GetProcAddress( GetModuleHandleA("ntdll.dll"), "NtCurrentTeb" );
- pNtGetContextThread = (void *)GetProcAddress( GetModuleHandleA("ntdll.dll"), "NtGetContextThread" );
- pNtSetContextThread = (void *)GetProcAddress( GetModuleHandleA("ntdll.dll"), "NtSetContextThread" );
- pNtReadVirtualMemory = (void *)GetProcAddress( GetModuleHandleA("ntdll.dll"), "NtReadVirtualMemory" );
- pRtlRaiseException = (void *)GetProcAddress( GetModuleHandleA("ntdll.dll"), "RtlRaiseException" );
- pNtTerminateProcess = (void *)GetProcAddress( GetModuleHandleA("ntdll.dll"), "NtTerminateProcess" );
- pRtlAddVectoredExceptionHandler = (void *)GetProcAddress( GetModuleHandleA("ntdll.dll"),
+ HMODULE hntdll = GetModuleHandleA("ntdll.dll");
+
+ pNtCurrentTeb = (void *)GetProcAddress( hntdll, "NtCurrentTeb" );
+ pNtGetContextThread = (void *)GetProcAddress( hntdll, "NtGetContextThread" );
+ pNtSetContextThread = (void *)GetProcAddress( hntdll, "NtSetContextThread" );
+ pNtReadVirtualMemory = (void *)GetProcAddress( hntdll, "NtReadVirtualMemory" );
+ pRtlRaiseException = (void *)GetProcAddress( hntdll, "RtlRaiseException" );
+ pNtTerminateProcess = (void *)GetProcAddress( hntdll, "NtTerminateProcess" );
+ pRtlAddVectoredExceptionHandler = (void *)GetProcAddress( hntdll,
"RtlAddVectoredExceptionHandler" );
- pRtlRemoveVectoredExceptionHandler = (void *)GetProcAddress( GetModuleHandleA("ntdll.dll"),
+ pRtlRemoveVectoredExceptionHandler = (void *)GetProcAddress( hntdll,
"RtlRemoveVectoredExceptionHandler" );
if (!pNtCurrentTeb)
{
- trace( "NtCurrentTeb not found, skipping tests\n" );
+ skip( "NtCurrentTeb not found\n" );
return;
}
More information about the wine-cvs
mailing list