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
8e2e95ed
Commit
8e2e95ed
authored
Aug 26, 2010
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ntdll/tests: Add a test for the protection state of the read-write data section.
parent
ed69ddb3
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
1 deletion
+10
-1
info.c
dlls/ntdll/tests/info.c
+10
-1
No files found.
dlls/ntdll/tests/info.c
View file @
8e2e95ed
...
@@ -1073,6 +1073,7 @@ static void test_queryvirtualmemory(void)
...
@@ -1073,6 +1073,7 @@ static void test_queryvirtualmemory(void)
NTSTATUS
status
;
NTSTATUS
status
;
SIZE_T
readcount
;
SIZE_T
readcount
;
static
const
char
teststring
[]
=
"test string"
;
static
const
char
teststring
[]
=
"test string"
;
static
char
datatestbuf
[
42
]
=
"abc"
;
static
char
rwtestbuf
[
42
];
static
char
rwtestbuf
[
42
];
MEMORY_BASIC_INFORMATION
mbi
;
MEMORY_BASIC_INFORMATION
mbi
;
char
stackbuf
[
42
];
char
stackbuf
[
42
];
...
@@ -1112,7 +1113,15 @@ static void test_queryvirtualmemory(void)
...
@@ -1112,7 +1113,15 @@ static void test_queryvirtualmemory(void)
if
(
mbi
.
Protect
!=
PAGE_READONLY
)
if
(
mbi
.
Protect
!=
PAGE_READONLY
)
todo_wine
ok
(
mbi
.
Protect
==
PAGE_READONLY
,
"mbi.Protect is 0x%x, expected 0x%X
\n
"
,
mbi
.
Protect
,
PAGE_READONLY
);
todo_wine
ok
(
mbi
.
Protect
==
PAGE_READONLY
,
"mbi.Protect is 0x%x, expected 0x%X
\n
"
,
mbi
.
Protect
,
PAGE_READONLY
);
trace
(
"Check flags of read-write global data (.bss) at %p
\n
"
,
rwtestbuf
);
trace
(
"Check flags of read-write data at %p
\n
"
,
datatestbuf
);
status
=
pNtQueryVirtualMemory
(
NtCurrentProcess
(),
datatestbuf
,
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
.
AllocationProtect
==
PAGE_EXECUTE_WRITECOPY
,
"mbi.AllocationProtect is 0x%x, expected 0x%x
\n
"
,
mbi
.
AllocationProtect
,
PAGE_EXECUTE_WRITECOPY
);
ok
(
mbi
.
State
==
MEM_COMMIT
,
"mbi.State is 0x%x, expected 0x%X
\n
"
,
mbi
.
State
,
MEM_COMMIT
);
ok
(
mbi
.
Protect
==
PAGE_READWRITE
,
"mbi.Protect is 0x%x, expected 0x%X
\n
"
,
mbi
.
Protect
,
PAGE_READWRITE
);
trace
(
"Check flags of read-write uninitialized data (.bss) at %p
\n
"
,
rwtestbuf
);
status
=
pNtQueryVirtualMemory
(
NtCurrentProcess
(),
rwtestbuf
,
MemoryBasicInformation
,
&
mbi
,
sizeof
(
MEMORY_BASIC_INFORMATION
),
&
readcount
);
status
=
pNtQueryVirtualMemory
(
NtCurrentProcess
(),
rwtestbuf
,
MemoryBasicInformation
,
&
mbi
,
sizeof
(
MEMORY_BASIC_INFORMATION
),
&
readcount
);
ok
(
status
==
STATUS_SUCCESS
,
"Expected STATUS_SUCCESS, got %08x
\n
"
,
status
);
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
(
readcount
==
sizeof
(
MEMORY_BASIC_INFORMATION
),
"Expected to read %d bytes, got %ld
\n
"
,(
int
)
sizeof
(
MEMORY_BASIC_INFORMATION
),
readcount
);
...
...
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