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
5bd58bb2
Commit
5bd58bb2
authored
May 31, 2017
by
Akihiro Sagawa
Committed by
Alexandre Julliard
May 31, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
kernel32/tests: Add more tests related to the zero_bits parameter.
Signed-off-by:
Akihiro Sagawa
<
sagawa.aki@gmail.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
d968d32a
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
30 additions
and
0 deletions
+30
-0
virtual.c
dlls/kernel32/tests/virtual.c
+30
-0
No files found.
dlls/kernel32/tests/virtual.c
View file @
5bd58bb2
...
...
@@ -386,6 +386,24 @@ static void test_VirtualAlloc(void)
ok
(
status
==
STATUS_CONFLICTING_ADDRESSES
,
"NtAllocateVirtualMemory returned %08x
\n
"
,
status
);
if
(
status
==
STATUS_SUCCESS
)
ok
(
VirtualFree
(
addr2
,
0
,
MEM_RELEASE
),
"VirtualFree failed
\n
"
);
/* 21 zero bits is valid */
size
=
0x1000
;
addr2
=
NULL
;
status
=
pNtAllocateVirtualMemory
(
GetCurrentProcess
(),
&
addr2
,
21
,
&
size
,
MEM_RESERVE
|
MEM_COMMIT
,
PAGE_EXECUTE_READWRITE
);
ok
(
status
==
STATUS_SUCCESS
||
status
==
STATUS_NO_MEMORY
,
"NtAllocateVirtualMemory returned %08x
\n
"
,
status
);
if
(
status
==
STATUS_SUCCESS
)
ok
(
VirtualFree
(
addr2
,
0
,
MEM_RELEASE
),
"VirtualFree failed
\n
"
);
/* 22 zero bits is invalid */
size
=
0x1000
;
addr2
=
NULL
;
status
=
pNtAllocateVirtualMemory
(
GetCurrentProcess
(),
&
addr2
,
22
,
&
size
,
MEM_RESERVE
|
MEM_COMMIT
,
PAGE_EXECUTE_READWRITE
);
todo_wine
ok
(
status
==
STATUS_INVALID_PARAMETER_3
,
"NtAllocateVirtualMemory returned %08x
\n
"
,
status
);
if
(
status
==
STATUS_SUCCESS
)
ok
(
VirtualFree
(
addr2
,
0
,
MEM_RELEASE
),
"VirtualFree failed
\n
"
);
/* AT_ROUND_TO_PAGE flag is not supported for VirtualAlloc */
SetLastError
(
0xdeadbeef
);
addr2
=
VirtualAlloc
(
addr1
,
0x1000
,
MEM_RESERVE
|
MEM_COMMIT
|
AT_ROUND_TO_PAGE
,
PAGE_EXECUTE_READWRITE
);
...
...
@@ -1146,6 +1164,18 @@ static void test_NtMapViewOfSection(void)
ok
(
!
status
,
"NtUnmapViewOfSection failed status %x
\n
"
,
status
);
}
/* 22 zero bits isn't acceptable */
ptr2
=
NULL
;
size
=
0
;
status
=
pNtMapViewOfSection
(
mapping
,
hProcess
,
&
ptr2
,
22
,
0
,
&
offset
,
&
size
,
1
,
0
,
PAGE_READWRITE
);
todo_wine
ok
(
status
==
STATUS_INVALID_PARAMETER_4
,
"NtMapViewOfSection returned %x
\n
"
,
status
);
if
(
status
==
STATUS_SUCCESS
)
{
status
=
pNtUnmapViewOfSection
(
hProcess
,
ptr2
);
ok
(
!
status
,
"NtUnmapViewOfSection failed status %x
\n
"
,
status
);
}
/* mapping at the same page conflicts */
ptr2
=
ptr
;
size
=
0
;
...
...
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