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
986d5a99
Commit
986d5a99
authored
Jul 09, 2018
by
Huw Davies
Committed by
Alexandre Julliard
Jul 09, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ntdll/tests: Skip the map protect tests if we can't disable no-exec.
Signed-off-by:
Huw Davies
<
huw@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
61d92d13
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
21 additions
and
11 deletions
+21
-11
info.c
dlls/ntdll/tests/info.c
+21
-11
No files found.
dlls/ntdll/tests/info.c
View file @
986d5a99
...
...
@@ -1776,20 +1776,30 @@ static void test_mapprotection(void)
NTSTATUS
status
;
SIZE_T
retlen
,
count
;
void
(
*
f
)(
void
);
BOOL
reset_flags
=
FALSE
;
if
(
!
pNtClose
)
{
skip
(
"No NtClose ... Win98
\n
"
);
return
;
}
/* Switch to being a noexec unaware process */
status
=
pNtQueryInformationProcess
(
GetCurrentProcess
(),
ProcessExecuteFlags
,
&
oldflags
,
sizeof
(
oldflags
),
&
flagsize
);
if
(
status
==
STATUS_INVALID_PARAMETER
)
{
skip
(
"Invalid Parameter on ProcessExecuteFlags query?
\n
"
);
if
(
status
==
STATUS_INVALID_PARAMETER
)
{
skip
(
"Unable to query process execute flags on this platform
\n
"
);
return
;
}
ok
(
(
status
==
STATUS_SUCCESS
)
||
(
status
==
STATUS_INVALID_INFO_CLASS
),
"Expected STATUS_SUCCESS, got %08x
\n
"
,
status
);
status
=
pNtSetInformationProcess
(
GetCurrentProcess
(),
ProcessExecuteFlags
,
&
flags
,
sizeof
(
flags
)
);
ok
(
(
status
==
STATUS_SUCCESS
)
||
(
status
==
STATUS_INVALID_INFO_CLASS
),
"Expected STATUS_SUCCESS, got %08x
\n
"
,
status
);
ok
(
status
==
STATUS_SUCCESS
,
"Expected STATUS_SUCCESS, got %08x
\n
"
,
status
);
trace
(
"Process execute flags %08x
\n
"
,
oldflags
);
if
(
oldflags
&
MEM_EXECUTE_OPTION_DISABLE
)
{
if
(
oldflags
&
MEM_EXECUTE_OPTION_PERMANENT
)
{
skip
(
"Unable to turn off noexec
\n
"
);
return
;
}
status
=
pNtSetInformationProcess
(
GetCurrentProcess
(),
ProcessExecuteFlags
,
&
flags
,
sizeof
(
flags
)
);
ok
(
status
==
STATUS_SUCCESS
,
"Expected STATUS_SUCCESS, got %08x
\n
"
,
status
);
reset_flags
=
TRUE
;
}
size
.
u
.
LowPart
=
0x2000
;
size
.
u
.
HighPart
=
0
;
...
...
@@ -1832,8 +1842,8 @@ static void test_mapprotection(void)
ok
(
status
==
STATUS_SUCCESS
,
"Expected STATUS_SUCCESS, got %08x
\n
"
,
status
);
pNtClose
(
h
);
/* Switch back */
pNtSetInformationProcess
(
GetCurrentProcess
(),
ProcessExecuteFlags
,
&
oldflags
,
sizeof
(
oldflags
)
);
if
(
reset_flags
)
pNtSetInformationProcess
(
GetCurrentProcess
(),
ProcessExecuteFlags
,
&
oldflags
,
sizeof
(
oldflags
)
);
}
static
void
test_queryvirtualmemory
(
void
)
...
...
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