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
6b46a4d2
Commit
6b46a4d2
authored
Aug 06, 2019
by
Jacek Caban
Committed by
Alexandre Julliard
Aug 07, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
kernel32/tests: Improve timeout handling in debugger tests.
Signed-off-by:
Jacek Caban
<
jacek@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
90bed22e
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
5 deletions
+8
-5
debugger.c
dlls/kernel32/tests/debugger.c
+8
-5
No files found.
dlls/kernel32/tests/debugger.c
View file @
6b46a4d2
...
...
@@ -226,6 +226,9 @@ struct debugger_context
void
*
image_base
;
};
#define WAIT_EVENT_TIMEOUT 20000
#define POLL_EVENT_TIMEOUT 200
#define next_event(a,b) next_event_(__LINE__,a,b)
static
void
next_event_
(
unsigned
line
,
struct
debugger_context
*
ctx
,
unsigned
timeout
)
{
...
...
@@ -301,7 +304,7 @@ static void process_attach_events(struct debugger_context *ctx)
do
{
next_event
(
ctx
,
2000
);
next_event
(
ctx
,
WAIT_EVENT_TIMEOUT
);
if
(
ctx
->
ev
.
dwDebugEventCode
==
LOAD_DLL_DEBUG_EVENT
)
ok
(
ctx
->
ev
.
u
.
LoadDll
.
lpBaseOfDll
!=
ntdll
,
"ntdll.dll reported out of order
\n
"
);
}
while
(
ctx
->
ev
.
dwDebugEventCode
==
LOAD_DLL_DEBUG_EVENT
||
ctx
->
ev
.
dwDebugEventCode
==
UNLOAD_DLL_DEBUG_EVENT
);
...
...
@@ -312,7 +315,7 @@ static void process_attach_events(struct debugger_context *ctx)
if
(
ctx
->
ev
.
dwDebugEventCode
==
CREATE_THREAD_DEBUG_EVENT
)
{
DWORD
last_thread
=
ctx
->
ev
.
dwThreadId
;
next_event
(
ctx
,
2000
);
next_event
(
ctx
,
WAIT_EVENT_TIMEOUT
);
ok
(
ctx
->
ev
.
dwThreadId
==
last_thread
,
"unexpected thread
\n
"
);
}
...
...
@@ -322,7 +325,7 @@ static void process_attach_events(struct debugger_context *ctx)
ok
(
ctx
->
ev
.
u
.
Exception
.
ExceptionRecord
.
ExceptionAddress
==
pDbgBreakPoint
,
"ExceptionAddres != DbgBreakPoint
\n
"
);
/* flush debug events */
do
next_event
(
ctx
,
200
);
do
next_event
(
ctx
,
POLL_EVENT_TIMEOUT
);
while
(
ctx
->
ev
.
dwDebugEventCode
==
LOAD_DLL_DEBUG_EVENT
||
ctx
->
ev
.
dwDebugEventCode
==
UNLOAD_DLL_DEBUG_EVENT
||
ctx
->
ev
.
dwDebugEventCode
==
CREATE_THREAD_DEBUG_EVENT
||
ctx
->
ev
.
dwDebugEventCode
==
EXIT_THREAD_DEBUG_EVENT
);
ok
(
ctx
->
ev
.
dwDebugEventCode
==
-
1
,
"dwDebugEventCode = %d
\n
"
,
ctx
->
ev
.
dwDebugEventCode
);
...
...
@@ -370,7 +373,7 @@ static void doDebugger(int argc, char** argv)
if
(
strstr
(
myARGV
[
2
],
"process"
))
{
next_event
(
&
ctx
,
2000
);
next_event
(
&
ctx
,
WAIT_EVENT_TIMEOUT
);
ok
(
ctx
.
ev
.
dwDebugEventCode
==
EXCEPTION_DEBUG_EVENT
,
"dwDebugEventCode = %d
\n
"
,
ctx
.
ev
.
dwDebugEventCode
);
ok
(
ctx
.
ev
.
u
.
Exception
.
ExceptionRecord
.
ExceptionCode
==
STATUS_ACCESS_VIOLATION
,
"ExceptionCode = %x
\n
"
,
ctx
.
ev
.
u
.
Exception
.
ExceptionRecord
.
ExceptionCode
);
...
...
@@ -958,7 +961,7 @@ static void test_debug_children(char *name, DWORD flag, BOOL debug_child)
if
(
flag
)
{
next_event
(
&
ctx
,
2000
);
next_event
(
&
ctx
,
WAIT_EVENT_TIMEOUT
);
ok
(
ctx
.
ev
.
dwDebugEventCode
==
CREATE_PROCESS_DEBUG_EVENT
,
"dwDebugEventCode = %d
\n
"
,
ctx
.
ev
.
dwDebugEventCode
);
ok
(
ctx
.
pid
==
pi
.
dwProcessId
,
"unexpected dwProcessId %x
\n
"
,
ctx
.
ev
.
dwProcessId
==
ctx
.
pid
);
...
...
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