mirror of
https://github.com/reactos/reactos.git
synced 2025-08-03 06:55:55 +00:00
[NTDLL_WINETEST] Add a PCH.
This commit is contained in:
parent
9cfa608dcf
commit
a76e7d13e2
21 changed files with 39 additions and 162 deletions
|
@ -24,15 +24,13 @@ list(APPEND SOURCE
|
||||||
rtlstr.c
|
rtlstr.c
|
||||||
string.c
|
string.c
|
||||||
time.c
|
time.c
|
||||||
testlist.c)
|
ntdll_test.h)
|
||||||
|
|
||||||
if(ARCH STREQUAL "i386")
|
if(ARCH STREQUAL "i386")
|
||||||
list(APPEND SOURCE
|
list(APPEND SOURCE generated.c)
|
||||||
generated.c
|
|
||||||
)
|
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
add_executable(ntdll_winetest ${SOURCE})
|
add_executable(ntdll_winetest ${SOURCE} testlist.c)
|
||||||
|
|
||||||
if(USE_CLANG_CL OR (NOT MSVC))
|
if(USE_CLANG_CL OR (NOT MSVC))
|
||||||
add_target_compile_flags(ntdll_winetest "-Wno-format")
|
add_target_compile_flags(ntdll_winetest "-Wno-format")
|
||||||
|
@ -40,4 +38,5 @@ 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 ntdll_test.h SOURCE)
|
||||||
add_rostests_file(TARGET ntdll_winetest)
|
add_rostests_file(TARGET ntdll_winetest)
|
||||||
|
|
|
@ -21,22 +21,7 @@
|
||||||
* windows.
|
* windows.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <stdio.h>
|
#include "ntdll_test.h"
|
||||||
#include <stdarg.h>
|
|
||||||
|
|
||||||
#include "ntstatus.h"
|
|
||||||
/* Define WIN32_NO_STATUS so MSVC does not give us duplicate macro
|
|
||||||
* definition errors when we get to winnt.h
|
|
||||||
*/
|
|
||||||
#define WIN32_NO_STATUS
|
|
||||||
|
|
||||||
#include "windef.h"
|
|
||||||
#include "winbase.h"
|
|
||||||
#include "winreg.h"
|
|
||||||
#include "winnls.h"
|
|
||||||
#include "winuser.h"
|
|
||||||
#include "wine/test.h"
|
|
||||||
#include "wine/winternl.h"
|
|
||||||
|
|
||||||
#ifndef __WINE_WINTERNL_H
|
#ifndef __WINE_WINTERNL_H
|
||||||
typedef unsigned short RTL_ATOM, *PRTL_ATOM;
|
typedef unsigned short RTL_ATOM, *PRTL_ATOM;
|
||||||
|
|
|
@ -18,14 +18,7 @@
|
||||||
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <ntstatus.h>
|
#include "ntdll_test.h"
|
||||||
#define WIN32_NO_STATUS
|
|
||||||
#include <windows.h>
|
|
||||||
#include <winnt.h>
|
|
||||||
#include <wine/winternl.h>
|
|
||||||
#include <winerror.h>
|
|
||||||
#include <stdio.h>
|
|
||||||
#include "wine/test.h"
|
|
||||||
|
|
||||||
static NTSTATUS (WINAPI *pNtNotifyChangeDirectoryFile)(
|
static NTSTATUS (WINAPI *pNtNotifyChangeDirectoryFile)(
|
||||||
HANDLE,HANDLE,PIO_APC_ROUTINE,PVOID,
|
HANDLE,HANDLE,PIO_APC_ROUTINE,PVOID,
|
||||||
|
|
|
@ -24,18 +24,7 @@
|
||||||
* windows.
|
* windows.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <stdio.h>
|
#include "ntdll_test.h"
|
||||||
#include <stdarg.h>
|
|
||||||
|
|
||||||
#include "ntstatus.h"
|
|
||||||
/* Define WIN32_NO_STATUS so MSVC does not give us duplicate macro
|
|
||||||
* definition errors when we get to winnt.h
|
|
||||||
*/
|
|
||||||
#define WIN32_NO_STATUS
|
|
||||||
|
|
||||||
#include "wine/test.h"
|
|
||||||
#include "winnls.h"
|
|
||||||
#include "wine/winternl.h"
|
|
||||||
|
|
||||||
static NTSTATUS (WINAPI *pNtClose)( PHANDLE );
|
static NTSTATUS (WINAPI *pNtClose)( PHANDLE );
|
||||||
static NTSTATUS (WINAPI *pNtOpenFile) ( PHANDLE, ACCESS_MASK, POBJECT_ATTRIBUTES, PIO_STATUS_BLOCK, ULONG, ULONG );
|
static NTSTATUS (WINAPI *pNtOpenFile) ( PHANDLE, ACCESS_MASK, POBJECT_ATTRIBUTES, PIO_STATUS_BLOCK, ULONG, ULONG );
|
||||||
|
|
|
@ -18,8 +18,6 @@
|
||||||
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <stdio.h>
|
|
||||||
|
|
||||||
#include "ntdll_test.h"
|
#include "ntdll_test.h"
|
||||||
|
|
||||||
static NTSTATUS (WINAPI *pRtlMultiByteToUnicodeN)( LPWSTR dst, DWORD dstlen, LPDWORD reslen,
|
static NTSTATUS (WINAPI *pRtlMultiByteToUnicodeN)( LPWSTR dst, DWORD dstlen, LPDWORD reslen,
|
||||||
|
|
|
@ -19,19 +19,9 @@
|
||||||
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <stdarg.h>
|
#include "ntdll_test.h"
|
||||||
#include <stdio.h>
|
|
||||||
|
|
||||||
#include "ntstatus.h"
|
#include <rpcnterr.h>
|
||||||
#define WIN32_NO_STATUS
|
|
||||||
|
|
||||||
#include "wine/test.h"
|
|
||||||
|
|
||||||
#include "windef.h"
|
|
||||||
#include "winbase.h"
|
|
||||||
#include "rpcnterr.h"
|
|
||||||
#include "winreg.h"
|
|
||||||
#include "wine/winternl.h"
|
|
||||||
|
|
||||||
/* FIXME!!! this test checks only mappings, defined by MSDN
|
/* FIXME!!! this test checks only mappings, defined by MSDN
|
||||||
* It is necessary to add other mappings and to test them
|
* It is necessary to add other mappings and to test them
|
||||||
|
|
|
@ -18,24 +18,9 @@
|
||||||
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <stdarg.h>
|
#include "ntdll_test.h"
|
||||||
#include <stdio.h>
|
|
||||||
|
|
||||||
#ifndef _WIN32_WINNT
|
#include <wine/exception.h>
|
||||||
#define _WIN32_WINNT 0x500 /* For NTSTATUS */
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#define NONAMELESSUNION
|
|
||||||
#define NONAMELESSSTRUCT
|
|
||||||
#include "ntstatus.h"
|
|
||||||
#define WIN32_NO_STATUS
|
|
||||||
#include "windef.h"
|
|
||||||
#include "winbase.h"
|
|
||||||
#include "winnt.h"
|
|
||||||
#include "winreg.h"
|
|
||||||
#include "wine/winternl.h"
|
|
||||||
#include "wine/exception.h"
|
|
||||||
#include "wine/test.h"
|
|
||||||
|
|
||||||
static void *code_mem;
|
static void *code_mem;
|
||||||
|
|
||||||
|
|
|
@ -24,19 +24,7 @@
|
||||||
* windows.
|
* windows.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <stdio.h>
|
#include "ntdll_test.h"
|
||||||
#include <stdarg.h>
|
|
||||||
|
|
||||||
#include "ntstatus.h"
|
|
||||||
/* Define WIN32_NO_STATUS so MSVC does not give us duplicate macro
|
|
||||||
* definition errors when we get to winnt.h
|
|
||||||
*/
|
|
||||||
#define WIN32_NO_STATUS
|
|
||||||
|
|
||||||
#include "wine/test.h"
|
|
||||||
#include "wine/winternl.h"
|
|
||||||
#include "winuser.h"
|
|
||||||
#include "wine/winioctl.h"
|
|
||||||
|
|
||||||
/* FIXME */
|
/* FIXME */
|
||||||
typedef struct _REPARSE_DATA_BUFFER {
|
typedef struct _REPARSE_DATA_BUFFER {
|
||||||
|
|
|
@ -5,16 +5,8 @@
|
||||||
* Unit tests for data structure packing
|
* Unit tests for data structure packing
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#define WINVER 0x0501
|
|
||||||
#define _WIN32_IE 0x0501
|
|
||||||
#define _WIN32_WINNT 0x0501
|
|
||||||
|
|
||||||
#define WINE_NOWINSOCK
|
|
||||||
|
|
||||||
#include "ntdll_test.h"
|
#include "ntdll_test.h"
|
||||||
|
|
||||||
#include "wine/test.h"
|
|
||||||
|
|
||||||
/***********************************************************************
|
/***********************************************************************
|
||||||
* Compatibility macros
|
* Compatibility macros
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -19,8 +19,6 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "ntdll_test.h"
|
#include "ntdll_test.h"
|
||||||
#include <winnls.h>
|
|
||||||
#include <stdio.h>
|
|
||||||
|
|
||||||
static NTSTATUS (WINAPI * pRtlDowncaseUnicodeString)(UNICODE_STRING *, const UNICODE_STRING *, BOOLEAN);
|
static NTSTATUS (WINAPI * pRtlDowncaseUnicodeString)(UNICODE_STRING *, const UNICODE_STRING *, BOOLEAN);
|
||||||
static NTSTATUS (WINAPI * pNtQuerySystemInformation)(SYSTEM_INFORMATION_CLASS, PVOID, ULONG, PULONG);
|
static NTSTATUS (WINAPI * pNtQuerySystemInformation)(SYSTEM_INFORMATION_CLASS, PVOID, ULONG, PULONG);
|
||||||
|
|
|
@ -21,11 +21,8 @@
|
||||||
* windows.
|
* windows.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <stdlib.h>
|
|
||||||
|
|
||||||
#include "ntdll_test.h"
|
#include "ntdll_test.h"
|
||||||
|
|
||||||
|
|
||||||
/* Function ptrs for ntdll calls */
|
/* Function ptrs for ntdll calls */
|
||||||
static HMODULE hntdll = 0;
|
static HMODULE hntdll = 0;
|
||||||
static LONGLONG (WINAPI *pRtlExtendedMagicDivide)(LONGLONG, LONGLONG, INT);
|
static LONGLONG (WINAPI *pRtlExtendedMagicDivide)(LONGLONG, LONGLONG, INT);
|
||||||
|
|
|
@ -18,14 +18,20 @@
|
||||||
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <stdarg.h>
|
#ifndef _NTDLL_TEST_H_
|
||||||
|
#define _NTDLL_TEST_H_
|
||||||
|
|
||||||
|
#include <stdio.h>
|
||||||
|
#include <ntstatus.h>
|
||||||
|
|
||||||
#include "ntstatus.h"
|
|
||||||
#define WIN32_NO_STATUS
|
#define WIN32_NO_STATUS
|
||||||
#include "windef.h"
|
#define _INC_WINDOWS
|
||||||
#include "winbase.h"
|
#define COM_NO_WINDOWS_H
|
||||||
#include "winnt.h"
|
|
||||||
#include "winreg.h"
|
|
||||||
|
|
||||||
#include "wine/winternl.h"
|
#include <wine/test.h>
|
||||||
#include "wine/test.h"
|
#include <winuser.h>
|
||||||
|
#include <winnls.h>
|
||||||
|
#include <winioctl.h>
|
||||||
|
#include <wine/winternl.h>
|
||||||
|
|
||||||
|
#endif /* !_NTDLL_TEST_H_ */
|
||||||
|
|
|
@ -20,10 +20,6 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "ntdll_test.h"
|
#include "ntdll_test.h"
|
||||||
#include "wine/winternl.h"
|
|
||||||
#include "stdio.h"
|
|
||||||
#include "winnt.h"
|
|
||||||
#include "stdlib.h"
|
|
||||||
|
|
||||||
static HANDLE (WINAPI *pCreateWaitableTimerA)(SECURITY_ATTRIBUTES*, BOOL, LPCSTR);
|
static HANDLE (WINAPI *pCreateWaitableTimerA)(SECURITY_ATTRIBUTES*, BOOL, LPCSTR);
|
||||||
static BOOLEAN (WINAPI *pRtlCreateUnicodeStringFromAsciiz)(PUNICODE_STRING, LPCSTR);
|
static BOOLEAN (WINAPI *pRtlCreateUnicodeStringFromAsciiz)(PUNICODE_STRING, LPCSTR);
|
||||||
|
|
|
@ -17,19 +17,7 @@
|
||||||
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <stdio.h>
|
#include "ntdll_test.h"
|
||||||
#include <stdarg.h>
|
|
||||||
|
|
||||||
#include "ntstatus.h"
|
|
||||||
#define WIN32_NO_STATUS
|
|
||||||
#include "windef.h"
|
|
||||||
#include "winbase.h"
|
|
||||||
#include "winuser.h"
|
|
||||||
#include "winreg.h"
|
|
||||||
#include "winnls.h"
|
|
||||||
#include "wine/test.h"
|
|
||||||
#include "wine/winternl.h"
|
|
||||||
#include "winioctl.h"
|
|
||||||
|
|
||||||
#ifndef __WINE_WINTERNL_H
|
#ifndef __WINE_WINTERNL_H
|
||||||
|
|
||||||
|
|
|
@ -17,18 +17,7 @@
|
||||||
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <stdio.h>
|
#include "ntdll_test.h"
|
||||||
#include <stdarg.h>
|
|
||||||
|
|
||||||
#include "ntstatus.h"
|
|
||||||
#define WIN32_NO_STATUS
|
|
||||||
#include "windef.h"
|
|
||||||
#include "winbase.h"
|
|
||||||
#include "winuser.h"
|
|
||||||
#include "winreg.h"
|
|
||||||
#include "winnls.h"
|
|
||||||
#include "wine/test.h"
|
|
||||||
#include "wine/winternl.h"
|
|
||||||
|
|
||||||
#ifndef __WINE_WINTERNL_H
|
#ifndef __WINE_WINTERNL_H
|
||||||
|
|
||||||
|
|
|
@ -18,13 +18,8 @@
|
||||||
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <stdio.h>
|
|
||||||
|
|
||||||
#include "ntdll_test.h"
|
#include "ntdll_test.h"
|
||||||
|
|
||||||
#include "windef.h"
|
|
||||||
#include "winbase.h"
|
|
||||||
|
|
||||||
static NTSTATUS (WINAPI *pNtResumeProcess)(HANDLE);
|
static NTSTATUS (WINAPI *pNtResumeProcess)(HANDLE);
|
||||||
static NTSTATUS (WINAPI *pNtSuspendProcess)(HANDLE);
|
static NTSTATUS (WINAPI *pNtSuspendProcess)(HANDLE);
|
||||||
static NTSTATUS (WINAPI *pNtSuspendThread)(HANDLE,PULONG);
|
static NTSTATUS (WINAPI *pNtSuspendThread)(HANDLE,PULONG);
|
||||||
|
|
|
@ -23,11 +23,8 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "ntdll_test.h"
|
#include "ntdll_test.h"
|
||||||
#include "wine/winternl.h"
|
|
||||||
#include "stdio.h"
|
#include <winreg.h>
|
||||||
#include "winnt.h"
|
|
||||||
#include "winnls.h"
|
|
||||||
#include "stdlib.h"
|
|
||||||
|
|
||||||
/* A test string */
|
/* A test string */
|
||||||
static const WCHAR stringW[] = {'s', 't', 'r', 'i', 'n', 'g', 'W', 0};
|
static const WCHAR stringW[] = {'s', 't', 'r', 'i', 'n', 'g', 'W', 0};
|
||||||
|
|
|
@ -21,14 +21,14 @@
|
||||||
* windows.
|
* windows.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <stdlib.h>
|
|
||||||
|
|
||||||
#include "ntdll_test.h"
|
#include "ntdll_test.h"
|
||||||
#include "inaddr.h"
|
|
||||||
#include "in6addr.h"
|
#include <inaddr.h>
|
||||||
#include "initguid.h"
|
#include <in6addr.h>
|
||||||
|
#include <objbase.h>
|
||||||
|
#include <initguid.h>
|
||||||
#define COBJMACROS
|
#define COBJMACROS
|
||||||
#include "shobjidl.h"
|
#include <shobjidl.h>
|
||||||
|
|
||||||
#ifndef __WINE_WINTERNL_H
|
#ifndef __WINE_WINTERNL_H
|
||||||
|
|
||||||
|
|
|
@ -22,13 +22,9 @@
|
||||||
* windows.
|
* windows.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <stdlib.h>
|
|
||||||
|
|
||||||
#define INITGUID
|
|
||||||
|
|
||||||
#include "ntdll_test.h"
|
#include "ntdll_test.h"
|
||||||
#include "winnls.h"
|
|
||||||
#include "guiddef.h"
|
#include <initguid.h>
|
||||||
|
|
||||||
#define HASH_STRING_ALGORITHM_X65599 1
|
#define HASH_STRING_ALGORITHM_X65599 1
|
||||||
#define HASH_STRING_ALGORITHM_INVALID 0xffffffff
|
#define HASH_STRING_ALGORITHM_INVALID 0xffffffff
|
||||||
|
|
|
@ -21,11 +21,8 @@
|
||||||
* windows.
|
* windows.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <stdlib.h>
|
|
||||||
|
|
||||||
#include "ntdll_test.h"
|
#include "ntdll_test.h"
|
||||||
|
|
||||||
|
|
||||||
/* Function ptrs for ntdll calls */
|
/* Function ptrs for ntdll calls */
|
||||||
static HMODULE hntdll = 0;
|
static HMODULE hntdll = 0;
|
||||||
static NTSTATUS (WINAPI *pRtlUnicodeStringToAnsiString)(STRING *, const UNICODE_STRING *, BOOLEAN);
|
static NTSTATUS (WINAPI *pRtlUnicodeStringToAnsiString)(STRING *, const UNICODE_STRING *, BOOLEAN);
|
||||||
|
|
|
@ -18,7 +18,6 @@
|
||||||
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#define NONAMELESSUNION
|
|
||||||
#include "ntdll_test.h"
|
#include "ntdll_test.h"
|
||||||
|
|
||||||
/* FIXME: Inspect */
|
/* FIXME: Inspect */
|
||||||
|
@ -203,7 +202,7 @@ static void test_NtGetTickCount(void)
|
||||||
|
|
||||||
for (i = 0; i < 5; ++i)
|
for (i = 0; i < 5; ++i)
|
||||||
{
|
{
|
||||||
diff = (user_shared_data->u.TickCountQuad * user_shared_data->TickCountMultiplier) >> 24;
|
diff = (user_shared_data->TickCountQuad * user_shared_data->TickCountMultiplier) >> 24;
|
||||||
diff = pNtGetTickCount() - diff;
|
diff = pNtGetTickCount() - diff;
|
||||||
ok(diff < 32, "NtGetTickCount - TickCountQuad too high, expected < 32 got %d\n", diff);
|
ok(diff < 32, "NtGetTickCount - TickCountQuad too high, expected < 32 got %d\n", diff);
|
||||||
Sleep(50);
|
Sleep(50);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue