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
811a0e0b
Commit
811a0e0b
authored
May 20, 2022
by
Nikolay Sivov
Committed by
Alexandre Julliard
May 20, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ntdll/tests: Add a basic test for MEM_RESERVE_PLACEHOLDER.
Signed-off-by:
Nikolay Sivov
<
nsivov@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
6fe7535c
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
24 additions
and
0 deletions
+24
-0
virtual.c
dlls/ntdll/tests/virtual.c
+24
-0
No files found.
dlls/ntdll/tests/virtual.c
View file @
811a0e0b
...
@@ -264,6 +264,12 @@ static void test_NtAllocateVirtualMemory(void)
...
@@ -264,6 +264,12 @@ static void test_NtAllocateVirtualMemory(void)
ok
(
status
==
STATUS_SUCCESS
,
"NtFreeVirtualMemory failed %lx
\n
"
,
status
);
ok
(
status
==
STATUS_SUCCESS
,
"NtFreeVirtualMemory failed %lx
\n
"
,
status
);
ok
(
size
==
0x10000
,
"wrong size %Ix
\n
"
,
size
);
ok
(
size
==
0x10000
,
"wrong size %Ix
\n
"
,
size
);
ok
(
addr2
==
addr1
,
"wrong addr %p
\n
"
,
addr2
);
ok
(
addr2
==
addr1
,
"wrong addr %p
\n
"
,
addr2
);
/* Placeholder functionality */
size
=
0x10000
;
addr1
=
NULL
;
status
=
NtAllocateVirtualMemory
(
NtCurrentProcess
(),
&
addr1
,
0
,
&
size
,
MEM_RESERVE
|
MEM_RESERVE_PLACEHOLDER
,
PAGE_NOACCESS
);
ok
(
!!
status
,
"Unexpected status %08lx.
\n
"
,
status
);
}
}
static
void
test_NtAllocateVirtualMemoryEx
(
void
)
static
void
test_NtAllocateVirtualMemoryEx
(
void
)
...
@@ -298,6 +304,24 @@ static void test_NtAllocateVirtualMemoryEx(void)
...
@@ -298,6 +304,24 @@ static void test_NtAllocateVirtualMemoryEx(void)
addr1
=
NULL
;
addr1
=
NULL
;
status
=
pNtAllocateVirtualMemoryEx
(
NULL
,
&
addr1
,
&
size
,
MEM_RESERVE
|
MEM_COMMIT
,
PAGE_EXECUTE_READWRITE
,
NULL
,
0
);
status
=
pNtAllocateVirtualMemoryEx
(
NULL
,
&
addr1
,
&
size
,
MEM_RESERVE
|
MEM_COMMIT
,
PAGE_EXECUTE_READWRITE
,
NULL
,
0
);
ok
(
status
==
STATUS_INVALID_HANDLE
,
"Unexpected status %08lx.
\n
"
,
status
);
ok
(
status
==
STATUS_INVALID_HANDLE
,
"Unexpected status %08lx.
\n
"
,
status
);
/* Placeholder functionality */
size
=
0x10000
;
addr1
=
NULL
;
status
=
NtAllocateVirtualMemory
(
NtCurrentProcess
(),
&
addr1
,
0
,
&
size
,
MEM_RESERVE
|
MEM_RESERVE_PLACEHOLDER
,
PAGE_NOACCESS
);
ok
(
status
==
STATUS_INVALID_PARAMETER
,
"Unexpected status %08lx.
\n
"
,
status
);
status
=
pNtAllocateVirtualMemoryEx
(
NtCurrentProcess
(),
&
addr1
,
&
size
,
MEM_RESERVE
|
MEM_RESERVE_PLACEHOLDER
,
PAGE_NOACCESS
,
NULL
,
0
);
todo_wine
ok
(
status
==
STATUS_SUCCESS
,
"Unexpected status %08lx.
\n
"
,
status
);
if
(
addr1
)
{
size
=
0
;
status
=
NtFreeVirtualMemory
(
NtCurrentProcess
(),
&
addr1
,
&
size
,
MEM_RELEASE
);
ok
(
status
==
STATUS_SUCCESS
,
"Unexpected status %08lx.
\n
"
,
status
);
}
}
}
struct
test_stack_size_thread_args
struct
test_stack_size_thread_args
...
...
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