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
4a384f45
Commit
4a384f45
authored
Feb 25, 2021
by
Zebediah Figura
Committed by
Alexandre Julliard
Mar 01, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
kernel32/tests: Add a test for Wow64Transition.
Signed-off-by:
Zebediah Figura
<
z.figura12@gmail.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
0421ea39
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
29 additions
and
0 deletions
+29
-0
loader.c
dlls/kernel32/tests/loader.c
+29
-0
No files found.
dlls/kernel32/tests/loader.c
View file @
4a384f45
...
...
@@ -4003,6 +4003,34 @@ static void test_LoadPackagedLibrary(void)
h
,
GetLastError
());
}
static
void
test_Wow64Transition
(
void
)
{
char
buffer
[
400
];
MEMORY_SECTION_NAME
*
name
=
(
MEMORY_SECTION_NAME
*
)
buffer
;
const
WCHAR
*
filepart
;
void
**
pWow64Transition
;
NTSTATUS
status
;
if
(
!
(
pWow64Transition
=
(
void
*
)
GetProcAddress
(
GetModuleHandleA
(
"ntdll"
),
"Wow64Transition"
)))
{
skip
(
"Wow64Transition is not present
\n
"
);
return
;
}
if
(
!
is_wow64
)
{
skip
(
"Wow64Transition is not patched
\n
"
);
return
;
}
status
=
NtQueryVirtualMemory
(
GetCurrentProcess
(),
*
pWow64Transition
,
MemorySectionName
,
name
,
sizeof
(
buffer
),
NULL
);
ok
(
!
status
,
"got %#x
\n
"
,
status
);
filepart
=
name
->
SectionFileName
.
Buffer
+
name
->
SectionFileName
.
Length
/
sizeof
(
WCHAR
);
while
(
*
filepart
!=
'\\'
)
--
filepart
;
ok
(
!
wcsnicmp
(
filepart
,
L"
\\
wow64cpu.dll"
,
wcslen
(
L"
\\
wow64cpu.dll"
)),
"got file name %s
\n
"
,
debugstr_wn
(
name
->
SectionFileName
.
Buffer
,
name
->
SectionFileName
.
Length
/
sizeof
(
WCHAR
)));
}
START_TEST
(
loader
)
{
int
argc
;
...
...
@@ -4079,6 +4107,7 @@ START_TEST(loader)
test_dll_file
(
"kernel32.dll"
);
test_dll_file
(
"advapi32.dll"
);
test_dll_file
(
"user32.dll"
);
test_Wow64Transition
();
/* loader test must be last, it can corrupt the internal loader state on Windows */
test_Loader
();
}
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