Rob Shearman : winetest: Detect if an unhandled exception occurred in a child process and print an appropriate message .
Alexandre Julliard
julliard at winehq.org
Wed May 7 13:28:10 CDT 2008
Module: wine
Branch: master
Commit: ce42c95a1c8a651ef0cfa0ba9d3eedea3a159391
URL: http://source.winehq.org/git/wine.git/?a=commit;h=ce42c95a1c8a651ef0cfa0ba9d3eedea3a159391
Author: Rob Shearman <rob at codeweavers.com>
Date: Wed May 7 11:10:51 2008 +0100
winetest: Detect if an unhandled exception occurred in a child process and print an appropriate message.
Avoid getting caught incrementing the failure count in this case, as it
could take a very long time to complete.
---
include/wine/test.h | 16 ++++++++++++----
1 files changed, 12 insertions(+), 4 deletions(-)
diff --git a/include/wine/test.h b/include/wine/test.h
index 72cd84c..1c91077 100644
--- a/include/wine/test.h
+++ b/include/wine/test.h
@@ -352,10 +352,18 @@ void winetest_wait_child_process( HANDLE process )
if (exit_code)
{
- fprintf( stdout, "%s: %u failures in child process\n",
- current_test->name, exit_code );
- while (exit_code-- > 0)
- InterlockedIncrement(&failures);
+ if (exit_code > 255)
+ {
+ fprintf( stdout, "%s: exception 0x%08x in child process\n", current_test->name, exit_code );
+ InterlockedIncrement( &failures );
+ }
+ else
+ {
+ fprintf( stdout, "%s: %u failures in child process\n",
+ current_test->name, exit_code );
+ while (exit_code-- > 0)
+ InterlockedIncrement(&failures);
+ }
}
}
More information about the wine-cvs
mailing list