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
6cd34c90
Commit
6cd34c90
authored
Mar 28, 2015
by
Andrew Cook
Committed by
Alexandre Julliard
Mar 31, 2015
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
kernel32/tests: Add tests for job inheritance.
Cleanup and improvements by Sebastian Lackner.
parent
f0ef853d
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
33 additions
and
0 deletions
+33
-0
process.c
dlls/kernel32/tests/process.c
+33
-0
No files found.
dlls/kernel32/tests/process.c
View file @
6cd34c90
...
...
@@ -2425,6 +2425,38 @@ static HANDLE test_AddSelfToJob(void)
return
job
;
}
static
void
test_jobInheritance
(
HANDLE
job
)
{
char
buffer
[
MAX_PATH
];
PROCESS_INFORMATION
pi
;
STARTUPINFOA
si
=
{
0
};
DWORD
dwret
;
BOOL
ret
,
out
;
if
(
!
pIsProcessInJob
)
{
win_skip
(
"IsProcessInJob not available.
\n
"
);
return
;
}
snprintf
(
buffer
,
MAX_PATH
,
"
\"
%s
\"
tests/process.c %s"
,
selfname
,
"exit"
);
ret
=
CreateProcessA
(
NULL
,
buffer
,
NULL
,
NULL
,
FALSE
,
0
,
NULL
,
NULL
,
&
si
,
&
pi
);
ok
(
ret
,
"CreateProcessA error %u
\n
"
,
GetLastError
());
out
=
FALSE
;
ret
=
pIsProcessInJob
(
pi
.
hProcess
,
job
,
&
out
);
ok
(
ret
,
"IsProcessInJob error %u
\n
"
,
GetLastError
());
todo_wine
ok
(
out
,
"IsProcessInJob returned out=%u
\n
"
,
out
);
dwret
=
WaitForSingleObject
(
pi
.
hProcess
,
1000
);
ok
(
dwret
==
WAIT_OBJECT_0
,
"WaitForSingleObject returned %u
\n
"
,
dwret
);
CloseHandle
(
pi
.
hProcess
);
CloseHandle
(
pi
.
hThread
);
}
static
void
test_BreakawayOk
(
HANDLE
job
)
{
JOBOBJECT_EXTENDED_LIMIT_INFORMATION
limit_info
;
...
...
@@ -2565,6 +2597,7 @@ START_TEST(process)
test_CompletionPort
();
test_KillOnJobClose
();
job
=
test_AddSelfToJob
();
test_jobInheritance
(
job
);
test_BreakawayOk
(
job
);
CloseHandle
(
job
);
}
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