Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
fb365b10
Commit
fb365b10
authored
May 01, 2018
by
Zebediah Figura
Committed by
Alexandre Julliard
May 02, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ntoskrnl.exe/tests: Add a simple test for MmMapLockedPagesSpecifyCache().
Signed-off-by:
Zebediah Figura
<
z.figura12@gmail.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
80f82ee9
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
22 additions
and
0 deletions
+22
-0
driver.c
dlls/ntoskrnl.exe/tests/driver.c
+21
-0
wdm.h
include/ddk/wdm.h
+1
-0
No files found.
dlls/ntoskrnl.exe/tests/driver.c
View file @
fb365b10
...
...
@@ -152,6 +152,26 @@ todo_wine
ok
(
current
!=
NULL
,
"Expected current process to be non-NULL
\n
"
);
}
static
void
test_mdl_map
(
void
)
{
char
buffer
[
20
]
=
"test buffer"
;
void
*
addr
;
MDL
*
mdl
;
mdl
=
IoAllocateMdl
(
buffer
,
sizeof
(
buffer
),
FALSE
,
FALSE
,
NULL
);
ok
(
mdl
!=
NULL
,
"IoAllocateMdl failed
\n
"
);
MmProbeAndLockPages
(
mdl
,
KernelMode
,
IoReadAccess
);
addr
=
MmMapLockedPagesSpecifyCache
(
mdl
,
KernelMode
,
MmCached
,
NULL
,
FALSE
,
NormalPagePriority
);
todo_wine
ok
(
addr
!=
NULL
,
"MmMapLockedPagesSpecifyCache failed
\n
"
);
/* MmUnmapLockedPages(addr, mdl); */
IoFreeMdl
(
mdl
);
}
static
NTSTATUS
main_test
(
IRP
*
irp
,
IO_STACK_LOCATION
*
stack
,
ULONG_PTR
*
info
)
{
ULONG
length
=
stack
->
Parameters
.
DeviceIoControl
.
OutputBufferLength
;
...
...
@@ -176,6 +196,7 @@ static NTSTATUS main_test(IRP *irp, IO_STACK_LOCATION *stack, ULONG_PTR *info)
ZwOpenFile
(
&
okfile
,
FILE_APPEND_DATA
,
&
attr
,
&
io
,
0
,
0
);
test_currentprocess
();
test_mdl_map
();
/* print process report */
if
(
test_input
->
winetest_debug
)
...
...
include/ddk/wdm.h
View file @
fb365b10
...
...
@@ -1423,6 +1423,7 @@ PMDL WINAPI MmAllocatePagesForMdl(PHYSICAL_ADDRESS,PHYSICAL_ADDRESS,PHYSICA
void
WINAPI
MmFreeNonCachedMemory
(
PVOID
,
SIZE_T
);
PVOID
WINAPI
MmMapLockedPagesSpecifyCache
(
PMDL
,
KPROCESSOR_MODE
,
MEMORY_CACHING_TYPE
,
PVOID
,
ULONG
,
ULONG
);
MM_SYSTEMSIZE
WINAPI
MmQuerySystemSize
(
void
);
void
WINAPI
MmProbeAndLockPages
(
PMDLX
,
KPROCESSOR_MODE
,
LOCK_OPERATION
);
static
inline
void
*
MmGetSystemAddressForMdlSafe
(
MDL
*
mdl
,
ULONG
priority
)
{
...
...
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