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
dadf93f4
Commit
dadf93f4
authored
May 11, 2020
by
Rémi Bernon
Committed by
Alexandre Julliard
May 12, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ntdll/tests: Add tests for USD memory basic info.
Signed-off-by:
Rémi Bernon
<
rbernon@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
89c24284
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
0 deletions
+15
-0
info.c
dlls/ntdll/tests/info.c
+15
-0
No files found.
dlls/ntdll/tests/info.c
View file @
dadf93f4
...
...
@@ -2181,6 +2181,7 @@ static void test_queryvirtualmemory(void)
MEMORY_BASIC_INFORMATION
mbi
;
char
stackbuf
[
42
];
HMODULE
module
;
void
*
user_shared_data
=
(
void
*
)
0x7ffe0000
;
module
=
GetModuleHandleA
(
"ntdll.dll"
);
trace
(
"Check flags of the PE header of NTDLL.DLL at %p
\n
"
,
module
);
...
...
@@ -2255,6 +2256,20 @@ static void test_queryvirtualmemory(void)
}
else
skip
(
"bss is outside of module
\n
"
);
/* this can happen on Mac OS */
trace
(
"Check flags of user shared data at %p
\n
"
,
user_shared_data
);
status
=
pNtQueryVirtualMemory
(
NtCurrentProcess
(),
user_shared_data
,
MemoryBasicInformation
,
&
mbi
,
sizeof
(
MEMORY_BASIC_INFORMATION
),
&
readcount
);
ok
(
status
==
STATUS_SUCCESS
,
"Expected STATUS_SUCCESS, got %08x
\n
"
,
status
);
ok
(
readcount
==
sizeof
(
MEMORY_BASIC_INFORMATION
),
"Expected to read %d bytes, got %ld
\n
"
,(
int
)
sizeof
(
MEMORY_BASIC_INFORMATION
),
readcount
);
ok
(
mbi
.
AllocationBase
==
user_shared_data
,
"mbi.AllocationBase is 0x%p, expected 0x%p
\n
"
,
mbi
.
AllocationBase
,
user_shared_data
);
todo_wine
ok
(
mbi
.
AllocationProtect
==
PAGE_READONLY
,
"mbi.AllocationProtect is 0x%x, expected 0x%x
\n
"
,
mbi
.
AllocationProtect
,
PAGE_READONLY
);
ok
(
mbi
.
State
==
MEM_COMMIT
,
"mbi.State is 0x%x, expected 0x%X
\n
"
,
mbi
.
State
,
MEM_COMMIT
);
todo_wine
ok
(
mbi
.
Protect
==
PAGE_READONLY
,
"mbi.Protect is 0x%x
\n
"
,
mbi
.
Protect
);
ok
(
mbi
.
Type
==
MEM_PRIVATE
,
"mbi.Type is 0x%x, expected 0x%x
\n
"
,
mbi
.
Type
,
MEM_PRIVATE
);
todo_wine
ok
(
mbi
.
RegionSize
==
0x1000
,
"mbi.RegionSize is 0x%lx, expected 0x%x
\n
"
,
mbi
.
RegionSize
,
0x1000
);
/* check error code when addr is higher than working set limit */
status
=
pNtQueryVirtualMemory
(
NtCurrentProcess
(),
(
void
*
)
~
0
,
MemoryBasicInformation
,
&
mbi
,
sizeof
(
mbi
),
&
readcount
);
ok
(
status
==
STATUS_INVALID_PARAMETER
,
"Expected STATUS_INVALID_PARAMETER, got %08x
\n
"
,
status
);
...
...
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