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
1110ecca
Commit
1110ecca
authored
Jul 28, 2016
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
kernel32/tests: Fix a few more loader test failures.
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
2e636d4f
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
7 deletions
+10
-7
loader.c
dlls/kernel32/tests/loader.c
+10
-7
No files found.
dlls/kernel32/tests/loader.c
View file @
1110ecca
...
@@ -340,17 +340,18 @@ static NTSTATUS map_image_section( const IMAGE_NT_HEADERS *nt_header )
...
@@ -340,17 +340,18 @@ static NTSTATUS map_image_section( const IMAGE_NT_HEADERS *nt_header )
LARGE_INTEGER
size
;
LARGE_INTEGER
size
;
HANDLE
file
,
map
;
HANDLE
file
,
map
;
NTSTATUS
status
;
NTSTATUS
status
;
ULONG
file_size
;
GetTempPathA
(
MAX_PATH
,
temp_path
);
GetTempPathA
(
MAX_PATH
,
temp_path
);
GetTempFileNameA
(
temp_path
,
"ldr"
,
0
,
dll_name
);
GetTempFileNameA
(
temp_path
,
"ldr"
,
0
,
dll_name
);
size
.
u
.
LowPart
=
create_test_dll
(
&
dos_header
,
sizeof
(
dos_header
),
nt_header
,
dll_name
);
file_size
=
create_test_dll
(
&
dos_header
,
sizeof
(
dos_header
),
nt_header
,
dll_name
);
ok
(
size
.
u
.
LowPart
,
"could not create %s
\n
"
,
dll_name
);
ok
(
file_size
,
"could not create %s
\n
"
,
dll_name
);
size
.
u
.
HighPart
=
0
;
file
=
CreateFileA
(
dll_name
,
GENERIC_READ
,
FILE_SHARE_READ
,
NULL
,
OPEN_EXISTING
,
0
,
0
);
file
=
CreateFileA
(
dll_name
,
GENERIC_READ
,
FILE_SHARE_READ
,
NULL
,
OPEN_EXISTING
,
0
,
0
);
ok
(
file
!=
INVALID_HANDLE_VALUE
,
"CreateFile error %d
\n
"
,
GetLastError
());
ok
(
file
!=
INVALID_HANDLE_VALUE
,
"CreateFile error %d
\n
"
,
GetLastError
());
size
.
QuadPart
=
file_size
;
status
=
pNtCreateSection
(
&
map
,
STANDARD_RIGHTS_REQUIRED
|
SECTION_MAP_READ
|
SECTION_QUERY
,
status
=
pNtCreateSection
(
&
map
,
STANDARD_RIGHTS_REQUIRED
|
SECTION_MAP_READ
|
SECTION_QUERY
,
NULL
,
&
size
,
PAGE_READONLY
,
SEC_IMAGE
,
file
);
NULL
,
&
size
,
PAGE_READONLY
,
SEC_IMAGE
,
file
);
if
(
!
status
)
if
(
!
status
)
...
@@ -362,8 +363,8 @@ static NTSTATUS map_image_section( const IMAGE_NT_HEADERS *nt_header )
...
@@ -362,8 +363,8 @@ static NTSTATUS map_image_section( const IMAGE_NT_HEADERS *nt_header )
ok
(
info_size
==
sizeof
(
info
),
"NtQuerySection wrong size %u
\n
"
,
info_size
);
ok
(
info_size
==
sizeof
(
info
),
"NtQuerySection wrong size %u
\n
"
,
info_size
);
ok
(
info
.
Attributes
==
(
SEC_IMAGE
|
SEC_FILE
),
"NtQuerySection wrong attr %x
\n
"
,
info
.
Attributes
);
ok
(
info
.
Attributes
==
(
SEC_IMAGE
|
SEC_FILE
),
"NtQuerySection wrong attr %x
\n
"
,
info
.
Attributes
);
ok
(
info
.
BaseAddress
==
NULL
,
"NtQuerySection wrong base %p
\n
"
,
info
.
BaseAddress
);
ok
(
info
.
BaseAddress
==
NULL
,
"NtQuerySection wrong base %p
\n
"
,
info
.
BaseAddress
);
ok
(
info
.
Size
.
QuadPart
==
size
.
QuadPart
,
"NtQuerySection wrong size %x%08x / %x
%08x
\n
"
,
ok
(
info
.
Size
.
QuadPart
==
file_size
,
"NtQuerySection wrong size %x%08x /
%08x
\n
"
,
info
.
Size
.
u
.
HighPart
,
info
.
Size
.
u
.
LowPart
,
size
.
u
.
HighPart
,
size
.
u
.
LowPart
);
info
.
Size
.
u
.
HighPart
,
info
.
Size
.
u
.
LowPart
,
file_size
);
query_image_section
(
1000
,
dll_name
,
nt_header
);
query_image_section
(
1000
,
dll_name
,
nt_header
);
}
}
if
(
map
)
CloseHandle
(
map
);
if
(
map
)
CloseHandle
(
map
);
...
@@ -1944,7 +1945,8 @@ static void child_process(const char *dll_name, DWORD target_offset)
...
@@ -1944,7 +1945,8 @@ static void child_process(const char *dll_name, DWORD target_offset)
memset
(
&
pbi
,
0
,
sizeof
(
pbi
));
memset
(
&
pbi
,
0
,
sizeof
(
pbi
));
ret
=
pNtQueryInformationProcess
(
process
,
ProcessBasicInformation
,
&
pbi
,
sizeof
(
pbi
),
NULL
);
ret
=
pNtQueryInformationProcess
(
process
,
ProcessBasicInformation
,
&
pbi
,
sizeof
(
pbi
),
NULL
);
ok
(
!
ret
,
"NtQueryInformationProcess error %#x
\n
"
,
ret
);
ok
(
!
ret
,
"NtQueryInformationProcess error %#x
\n
"
,
ret
);
ok
(
pbi
.
ExitStatus
==
STILL_ACTIVE
,
"expected STILL_ACTIVE, got %lu
\n
"
,
pbi
.
ExitStatus
);
ok
(
pbi
.
ExitStatus
==
STILL_ACTIVE
||
pbi
.
ExitStatus
==
195
,
"expected STILL_ACTIVE, got %lu
\n
"
,
pbi
.
ExitStatus
);
affinity
=
1
;
affinity
=
1
;
ret
=
pNtSetInformationProcess
(
process
,
ProcessAffinityMask
,
&
affinity
,
sizeof
(
affinity
));
ret
=
pNtSetInformationProcess
(
process
,
ProcessAffinityMask
,
&
affinity
,
sizeof
(
affinity
));
ok
(
!
ret
,
"NtSetInformationProcess error %#x
\n
"
,
ret
);
ok
(
!
ret
,
"NtSetInformationProcess error %#x
\n
"
,
ret
);
...
@@ -1979,7 +1981,8 @@ static void child_process(const char *dll_name, DWORD target_offset)
...
@@ -1979,7 +1981,8 @@ static void child_process(const char *dll_name, DWORD target_offset)
memset
(
&
pbi
,
0
,
sizeof
(
pbi
));
memset
(
&
pbi
,
0
,
sizeof
(
pbi
));
ret
=
pNtQueryInformationProcess
(
process
,
ProcessBasicInformation
,
&
pbi
,
sizeof
(
pbi
),
NULL
);
ret
=
pNtQueryInformationProcess
(
process
,
ProcessBasicInformation
,
&
pbi
,
sizeof
(
pbi
),
NULL
);
ok
(
!
ret
,
"NtQueryInformationProcess error %#x
\n
"
,
ret
);
ok
(
!
ret
,
"NtQueryInformationProcess error %#x
\n
"
,
ret
);
ok
(
pbi
.
ExitStatus
==
STILL_ACTIVE
,
"expected STILL_ACTIVE, got %lu
\n
"
,
pbi
.
ExitStatus
);
ok
(
pbi
.
ExitStatus
==
STILL_ACTIVE
||
pbi
.
ExitStatus
==
195
,
"expected STILL_ACTIVE, got %lu
\n
"
,
pbi
.
ExitStatus
);
affinity
=
1
;
affinity
=
1
;
ret
=
pNtSetInformationProcess
(
process
,
ProcessAffinityMask
,
&
affinity
,
sizeof
(
affinity
));
ret
=
pNtSetInformationProcess
(
process
,
ProcessAffinityMask
,
&
affinity
,
sizeof
(
affinity
));
ok
(
!
ret
,
"NtSetInformationProcess error %#x
\n
"
,
ret
);
ok
(
!
ret
,
"NtSetInformationProcess error %#x
\n
"
,
ret
);
...
...
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