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
e39c09f5
Commit
e39c09f5
authored
Dec 29, 2022
by
André Zwing
Committed by
Alexandre Julliard
Jan 06, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
kernel32/tests: Don't test function directly when reporting GetLastError().
parent
e2b0cbb7
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
8 deletions
+9
-8
virtual.c
dlls/kernel32/tests/virtual.c
+9
-8
No files found.
dlls/kernel32/tests/virtual.c
View file @
e39c09f5
...
@@ -4224,6 +4224,7 @@ static void test_PrefetchVirtualMemory(void)
...
@@ -4224,6 +4224,7 @@ static void test_PrefetchVirtualMemory(void)
char
stackmem
[]
=
"Test stack mem"
;
char
stackmem
[]
=
"Test stack mem"
;
static
char
testmem
[]
=
"Test memory range data"
;
static
char
testmem
[]
=
"Test memory range data"
;
unsigned
int
page_size
=
si
.
dwPageSize
;
unsigned
int
page_size
=
si
.
dwPageSize
;
BOOL
ret
;
if
(
!
pPrefetchVirtualMemory
)
if
(
!
pPrefetchVirtualMemory
)
{
{
...
@@ -4236,28 +4237,28 @@ static void test_PrefetchVirtualMemory(void)
...
@@ -4236,28 +4237,28 @@ static void test_PrefetchVirtualMemory(void)
entries
[
0
].
VirtualAddress
=
ULongToPtr
(
PtrToUlong
(
testmem
)
&
-
(
ULONG_PTR
)
page_size
);
entries
[
0
].
VirtualAddress
=
ULongToPtr
(
PtrToUlong
(
testmem
)
&
-
(
ULONG_PTR
)
page_size
);
entries
[
0
].
NumberOfBytes
=
page_size
;
entries
[
0
].
NumberOfBytes
=
page_size
;
ok
(
pPrefetchVirtualMemory
(
GetCurrentProcess
(),
1
,
entries
,
0
)
||
ret
=
pPrefetchVirtualMemory
(
GetCurrentProcess
(),
1
,
entries
,
0
);
broken
(
is_wow64
&&
GetLastError
()
==
ERROR_INVALID_PARAMETER
)
/* win10 1507 */
,
ok
(
ret
||
broken
(
is_wow64
&&
GetLastError
()
==
ERROR_INVALID_PARAMETER
)
/* win10 1507 */
,
"PrefetchVirtualMemory unexpected status on 1 page-aligned entry: %ld
\n
"
,
GetLastError
()
);
"PrefetchVirtualMemory unexpected status on 1 page-aligned entry: %ld
\n
"
,
GetLastError
()
);
entries
[
0
].
VirtualAddress
=
testmem
;
entries
[
0
].
VirtualAddress
=
testmem
;
entries
[
0
].
NumberOfBytes
=
sizeof
(
testmem
);
entries
[
0
].
NumberOfBytes
=
sizeof
(
testmem
);
ok
(
pPrefetchVirtualMemory
(
GetCurrentProcess
(),
1
,
entries
,
0
)
||
ret
=
pPrefetchVirtualMemory
(
GetCurrentProcess
(),
1
,
entries
,
0
);
broken
(
is_wow64
&&
GetLastError
()
==
ERROR_INVALID_PARAMETER
)
/* win10 1507 */
,
ok
(
ret
||
broken
(
is_wow64
&&
GetLastError
()
==
ERROR_INVALID_PARAMETER
)
/* win10 1507 */
,
"PrefetchVirtualMemory unexpected status on 1 entry: %ld
\n
"
,
GetLastError
()
);
"PrefetchVirtualMemory unexpected status on 1 entry: %ld
\n
"
,
GetLastError
()
);
entries
[
0
].
VirtualAddress
=
NULL
;
entries
[
0
].
VirtualAddress
=
NULL
;
entries
[
0
].
NumberOfBytes
=
page_size
;
entries
[
0
].
NumberOfBytes
=
page_size
;
ok
(
pPrefetchVirtualMemory
(
GetCurrentProcess
(),
1
,
entries
,
0
)
||
ret
=
pPrefetchVirtualMemory
(
GetCurrentProcess
(),
1
,
entries
,
0
);
broken
(
is_wow64
&&
GetLastError
()
==
ERROR_INVALID_PARAMETER
)
/* win10 1507 */
,
ok
(
ret
||
broken
(
is_wow64
&&
GetLastError
()
==
ERROR_INVALID_PARAMETER
)
/* win10 1507 */
,
"PrefetchVirtualMemory unexpected status on 1 unmapped entry: %ld
\n
"
,
GetLastError
()
);
"PrefetchVirtualMemory unexpected status on 1 unmapped entry: %ld
\n
"
,
GetLastError
()
);
entries
[
0
].
VirtualAddress
=
ULongToPtr
(
PtrToUlong
(
testmem
)
&
-
(
ULONG_PTR
)
page_size
);
entries
[
0
].
VirtualAddress
=
ULongToPtr
(
PtrToUlong
(
testmem
)
&
-
(
ULONG_PTR
)
page_size
);
entries
[
0
].
NumberOfBytes
=
page_size
;
entries
[
0
].
NumberOfBytes
=
page_size
;
entries
[
1
].
VirtualAddress
=
ULongToPtr
(
PtrToUlong
(
stackmem
)
&
-
(
ULONG_PTR
)
page_size
);
entries
[
1
].
VirtualAddress
=
ULongToPtr
(
PtrToUlong
(
stackmem
)
&
-
(
ULONG_PTR
)
page_size
);
entries
[
1
].
NumberOfBytes
=
page_size
;
entries
[
1
].
NumberOfBytes
=
page_size
;
ok
(
pPrefetchVirtualMemory
(
GetCurrentProcess
(),
2
,
entries
,
0
)
||
ret
=
pPrefetchVirtualMemory
(
GetCurrentProcess
(),
2
,
entries
,
0
);
broken
(
is_wow64
&&
GetLastError
()
==
ERROR_INVALID_PARAMETER
)
/* win10 1507 */
,
ok
(
ret
||
broken
(
is_wow64
&&
GetLastError
()
==
ERROR_INVALID_PARAMETER
)
/* win10 1507 */
,
"PrefetchVirtualMemory unexpected status on 2 page-aligned entries: %ld
\n
"
,
GetLastError
()
);
"PrefetchVirtualMemory unexpected status on 2 page-aligned entries: %ld
\n
"
,
GetLastError
()
);
}
}
...
...
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