ntdll/tests: Remove unnecessary shared header.

And remove some duplicate includes.
This commit is contained in:
Alexandre Julliard 2024-04-25 23:02:02 +02:00
parent cc038c1a40
commit 6f4c2b7f5a
16 changed files with 124 additions and 60 deletions

View file

@ -19,8 +19,14 @@
*/
#include <stdio.h>
#include <stdarg.h>
#include "ntdll_test.h"
#include "ntstatus.h"
#define WIN32_NO_STATUS
#include "windef.h"
#include "winbase.h"
#include "winternl.h"
#include "wine/test.h"
static NTSTATUS (WINAPI *pRtlMultiByteToUnicodeN)( LPWSTR dst, DWORD dstlen, LPDWORD reslen,
LPCSTR src, DWORD srclen );

View file

@ -7,8 +7,13 @@
#define WINE_NOWINSOCK
#include "ntdll_test.h"
#include <stdarg.h>
#include "ntstatus.h"
#define WIN32_NO_STATUS
#include "windef.h"
#include "winbase.h"
#include "winternl.h"
#include "wine/test.h"
/***********************************************************************

View file

@ -18,11 +18,18 @@
*
*/
#include "ntdll_test.h"
#include <winnls.h>
#include <ddk/ntddk.h>
#include <stdarg.h>
#include <stdio.h>
#include "ntstatus.h"
#define WIN32_NO_STATUS
#include "windef.h"
#include "winbase.h"
#include "winternl.h"
#include "winnls.h"
#include "ddk/ntddk.h"
#include "wine/test.h"
static NTSTATUS (WINAPI * pNtQuerySystemInformation)(SYSTEM_INFORMATION_CLASS, PVOID, ULONG, PULONG);
static NTSTATUS (WINAPI * pNtSetSystemInformation)(SYSTEM_INFORMATION_CLASS, PVOID, ULONG);
static NTSTATUS (WINAPI * pRtlGetNativeSystemInformation)(SYSTEM_INFORMATION_CLASS, PVOID, ULONG, PULONG);
@ -2351,14 +2358,14 @@ static void test_query_process_image_file_name(void)
status = NtQueryInformationProcess( GetCurrentProcess(), ProcessImageFileName, &image_file_name, sizeof(image_file_name), &ReturnLength);
ok( status == STATUS_INFO_LENGTH_MISMATCH, "Expected STATUS_INFO_LENGTH_MISMATCH, got %08lx\n", status);
buffer = heap_alloc(ReturnLength);
buffer = malloc(ReturnLength);
status = NtQueryInformationProcess( GetCurrentProcess(), ProcessImageFileName, buffer, ReturnLength, &ReturnLength);
ok( status == STATUS_SUCCESS, "Expected STATUS_SUCCESS, got %08lx\n", status);
todo_wine
ok(!memcmp(buffer->Buffer, deviceW, sizeof(deviceW)),
"Expected image name to begin with \\Device\\, got %s\n",
wine_dbgstr_wn(buffer->Buffer, buffer->Length / sizeof(WCHAR)));
heap_free(buffer);
free(buffer);
status = NtQueryInformationProcess(NULL, ProcessImageFileNameWin32, &image_file_name, sizeof(image_file_name), NULL);
if (status == STATUS_INVALID_INFO_CLASS)
@ -2374,13 +2381,13 @@ static void test_query_process_image_file_name(void)
status = NtQueryInformationProcess( GetCurrentProcess(), ProcessImageFileNameWin32, &image_file_name, sizeof(image_file_name), &ReturnLength);
ok( status == STATUS_INFO_LENGTH_MISMATCH, "Expected STATUS_INFO_LENGTH_MISMATCH, got %08lx\n", status);
buffer = heap_alloc(ReturnLength);
buffer = malloc(ReturnLength);
status = NtQueryInformationProcess( GetCurrentProcess(), ProcessImageFileNameWin32, buffer, ReturnLength, &ReturnLength);
ok( status == STATUS_SUCCESS, "Expected STATUS_SUCCESS, got %08lx\n", status);
ok(memcmp(buffer->Buffer, deviceW, sizeof(deviceW)),
"Expected image name not to begin with \\Device\\, got %s\n",
wine_dbgstr_wn(buffer->Buffer, buffer->Length / sizeof(WCHAR)));
heap_free(buffer);
free(buffer);
}
static void test_query_process_image_info(void)

View file

@ -22,8 +22,14 @@
*/
#include <stdlib.h>
#include <stdarg.h>
#include "ntdll_test.h"
#include "ntstatus.h"
#define WIN32_NO_STATUS
#include "windef.h"
#include "winbase.h"
#include "winternl.h"
#include "wine/test.h"
/* Function ptrs for ntdll calls */

View file

@ -1,32 +0,0 @@
/*
* Unit test suite for ntdll functions
*
* Copyright 2003 Eric Pouech
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
#include <stdarg.h>
#include "ntstatus.h"
#define WIN32_NO_STATUS
#include "windef.h"
#include "winbase.h"
#include "winnt.h"
#include "winreg.h"
#include "winternl.h"
#include "wine/test.h"
#include "wine/heap.h"

View file

@ -19,13 +19,18 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
#include "ntdll_test.h"
#include <stdarg.h>
#include <stdio.h>
#include <stdlib.h>
#include "ntstatus.h"
#define WIN32_NO_STATUS
#include "windef.h"
#include "winbase.h"
#include "winternl.h"
#include "winuser.h"
#include "ddk/wdm.h"
#include "stdio.h"
#include "winnt.h"
#include "stdlib.h"
#include "wine/test.h"
static VOID (WINAPI *pRtlInitUnicodeString)( PUNICODE_STRING, LPCWSTR );
static NTSTATUS (WINAPI *pNtCreateEvent) ( PHANDLE, ACCESS_MASK, const POBJECT_ATTRIBUTES, EVENT_TYPE, BOOLEAN);

View file

@ -18,9 +18,16 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
#include "ntdll_test.h"
#include <stdarg.h>
#include "ntstatus.h"
#define WIN32_NO_STATUS
#include "windef.h"
#include "winbase.h"
#include "winternl.h"
#include "winnls.h"
#include "ddk/ntddk.h"
#include "wine/test.h"
static NTSTATUS (WINAPI *pRtlMultiByteToUnicodeN)( LPWSTR dst, DWORD dstlen, LPDWORD reslen,
LPCSTR src, DWORD srclen );

View file

@ -22,12 +22,18 @@
*
*/
#include "ntdll_test.h"
#include "winternl.h"
#include "stdio.h"
#include "winnt.h"
#include <stdarg.h>
#include <stdio.h>
#include <stdlib.h>
#include "ntstatus.h"
#define WIN32_NO_STATUS
#include "windef.h"
#include "winbase.h"
#include "winreg.h"
#include "winnls.h"
#include "stdlib.h"
#include "winternl.h"
#include "wine/test.h"
/* A test string */
static const WCHAR stringW[] = {'s', 't', 'r', 'i', 'n', 'g', 'W', 0};

View file

@ -22,12 +22,19 @@
*/
#include <stdlib.h>
#include <stdarg.h>
#include "ntdll_test.h"
#include "ntstatus.h"
#define WIN32_NO_STATUS
#include "windef.h"
#include "winbase.h"
#include "winreg.h"
#include "winternl.h"
#include "in6addr.h"
#include "inaddr.h"
#include "ip2string.h"
#include "ddk/ntifs.h"
#include "wine/test.h"
#include "wine/asm.h"
#ifndef __WINE_WINTERNL_H

View file

@ -21,7 +21,14 @@
* in later versions of ntdll.
*/
#include "ntdll_test.h"
#include <stdarg.h>
#include "ntstatus.h"
#define WIN32_NO_STATUS
#include "windef.h"
#include "winbase.h"
#include "winternl.h"
#include "wine/test.h"
#ifdef __WINE_WINTERNL_H

View file

@ -23,12 +23,18 @@
*/
#include <stdlib.h>
#include <stdarg.h>
#define INITGUID
#include "ntdll_test.h"
#include "ntstatus.h"
#define WIN32_NO_STATUS
#include "windef.h"
#include "winbase.h"
#include "winternl.h"
#include "winnls.h"
#include "guiddef.h"
#include "wine/test.h"
/* Function ptrs for ntdll calls */
static HMODULE hntdll = 0;

View file

@ -23,9 +23,15 @@
#include <stdlib.h>
#include <limits.h>
#include <stdarg.h>
#include "ntdll_test.h"
#include "ntstatus.h"
#define WIN32_NO_STATUS
#include "windef.h"
#include "winbase.h"
#include "winternl.h"
#include "winnls.h"
#include "wine/test.h"
/* Function ptrs for ntdll calls */

View file

@ -19,7 +19,14 @@
*
*/
#include "ntdll_test.h"
#include <stdarg.h>
#include "ntstatus.h"
#define WIN32_NO_STATUS
#include "windef.h"
#include "winbase.h"
#include "winternl.h"
#include "wine/test.h"
static NTSTATUS (WINAPI *pNtCreateThreadEx)( HANDLE *, ACCESS_MASK, OBJECT_ATTRIBUTES *,
HANDLE, PRTL_THREAD_START_ROUTINE, void *,

View file

@ -18,7 +18,14 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
#include "ntdll_test.h"
#include <stdarg.h>
#include "ntstatus.h"
#define WIN32_NO_STATUS
#include "windef.h"
#include "winbase.h"
#include "winternl.h"
#include "wine/test.h"
static NTSTATUS (WINAPI *pTpAllocCleanupGroup)(TP_CLEANUP_GROUP **);
static NTSTATUS (WINAPI *pTpAllocIoCompletion)(TP_IO **,HANDLE,PTP_IO_CALLBACK,void *,TP_CALLBACK_ENVIRON *);

View file

@ -18,9 +18,16 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
#include "ntdll_test.h"
#include <stdarg.h>
#include "ntstatus.h"
#define WIN32_NO_STATUS
#include "windef.h"
#include "winbase.h"
#include "winternl.h"
#include "ddk/wdm.h"
#include "intrin.h"
#include "wine/test.h"
#define TICKSPERSEC 10000000
#define TICKSPERMSEC 10000

View file

@ -19,10 +19,17 @@
*
*/
#include "ntdll_test.h"
#include <stdarg.h>
#include "ntstatus.h"
#define WIN32_NO_STATUS
#include "windef.h"
#include "winbase.h"
#include "winternl.h"
#include "winioctl.h"
#include "winuser.h"
#include "ddk/wdm.h"
#include "wine/test.h"
static NTSTATUS (WINAPI *pNtQuerySystemInformation)(SYSTEM_INFORMATION_CLASS,void*,ULONG,ULONG*);
static NTSTATUS (WINAPI *pNtQuerySystemInformationEx)(SYSTEM_INFORMATION_CLASS,void*,ULONG,void*,ULONG,ULONG*);