Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
6f4c2b7f
Commit
6f4c2b7f
authored
Apr 25, 2024
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ntdll/tests: Remove unnecessary shared header.
And remove some duplicate includes.
parent
cc038c1a
Hide whitespace changes
Inline
Side-by-side
Showing
16 changed files
with
127 additions
and
63 deletions
+127
-63
env.c
dlls/ntdll/tests/env.c
+8
-2
generated.c
dlls/ntdll/tests/generated.c
+6
-1
info.c
dlls/ntdll/tests/info.c
+14
-7
large_int.c
dlls/ntdll/tests/large_int.c
+8
-2
ntdll_test.h
dlls/ntdll/tests/ntdll_test.h
+0
-32
om.c
dlls/ntdll/tests/om.c
+9
-4
path.c
dlls/ntdll/tests/path.c
+8
-1
reg.c
dlls/ntdll/tests/reg.c
+11
-5
rtl.c
dlls/ntdll/tests/rtl.c
+9
-2
rtlbitmap.c
dlls/ntdll/tests/rtlbitmap.c
+8
-1
rtlstr.c
dlls/ntdll/tests/rtlstr.c
+7
-1
string.c
dlls/ntdll/tests/string.c
+7
-1
thread.c
dlls/ntdll/tests/thread.c
+8
-1
threadpool.c
dlls/ntdll/tests/threadpool.c
+8
-1
time.c
dlls/ntdll/tests/time.c
+8
-1
wow64.c
dlls/ntdll/tests/wow64.c
+8
-1
No files found.
dlls/ntdll/tests/env.c
View file @
6f4c2b7f
...
...
@@ -19,8 +19,14 @@
*/
#include <stdio.h>
#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
*
pRtlMultiByteToUnicodeN
)(
LPWSTR
dst
,
DWORD
dstlen
,
LPDWORD
reslen
,
LPCSTR
src
,
DWORD
srclen
);
...
...
dlls/ntdll/tests/generated.c
View file @
6f4c2b7f
...
...
@@ -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"
/***********************************************************************
...
...
dlls/ntdll/tests/info.c
View file @
6f4c2b7f
...
...
@@ -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
=
m
alloc
(
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
=
m
alloc
(
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
)
...
...
dlls/ntdll/tests/large_int.c
View file @
6f4c2b7f
...
...
@@ -22,8 +22,14 @@
*/
#include <stdlib.h>
#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"
/* Function ptrs for ntdll calls */
...
...
dlls/ntdll/tests/ntdll_test.h
deleted
100644 → 0
View file @
cc038c1a
/*
* 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"
dlls/ntdll/tests/om.c
View file @
6f4c2b7f
...
...
@@ -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
);
...
...
dlls/ntdll/tests/path.c
View file @
6f4c2b7f
...
...
@@ -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
);
...
...
dlls/ntdll/tests/reg.c
View file @
6f4c2b7f
...
...
@@ -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
};
...
...
dlls/ntdll/tests/rtl.c
View file @
6f4c2b7f
...
...
@@ -22,12 +22,19 @@
*/
#include <stdlib.h>
#include "ntdll_test.h"
#include <stdarg.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
...
...
dlls/ntdll/tests/rtlbitmap.c
View file @
6f4c2b7f
...
...
@@ -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
...
...
dlls/ntdll/tests/rtlstr.c
View file @
6f4c2b7f
...
...
@@ -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
;
...
...
dlls/ntdll/tests/string.c
View file @
6f4c2b7f
...
...
@@ -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 */
...
...
dlls/ntdll/tests/thread.c
View file @
6f4c2b7f
...
...
@@ -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
*
,
...
...
dlls/ntdll/tests/threadpool.c
View file @
6f4c2b7f
...
...
@@ -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
*
);
...
...
dlls/ntdll/tests/time.c
View file @
6f4c2b7f
...
...
@@ -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
...
...
dlls/ntdll/tests/wow64.c
View file @
6f4c2b7f
...
...
@@ -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
*
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment