From ce42c95a1c8a651ef0cfa0ba9d3eedea3a159391 Mon Sep 17 00:00:00 2001 From: Rob Shearman Date: Wed, 7 May 2008 11:10:51 +0100 Subject: [PATCH] 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 file changed, 12 insertions(+), 4 deletions(-) diff --git a/include/wine/test.h b/include/wine/test.h index 72cd84c6a78..1c91077d13a 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); + } } }