This lets tests signal that for a while exceptions are expected and should not be counted as test failures.
Signed-off-by: Francois Gouget fgouget@codeweavers.com --- include/wine/test.h | 12 ++++++++++++ 1 file changed, 12 insertions(+)
diff --git a/include/wine/test.h b/include/wine/test.h index 787fea0ba24..4408366566c 100644 --- a/include/wine/test.h +++ b/include/wine/test.h @@ -61,6 +61,7 @@ extern const char *winetest_platform;
extern void winetest_set_location( const char* file, int line ); extern void winetest_subtest( const char* name ); +extern void winetest_ignore_exceptions( BOOL ignore ); extern void winetest_start_todo( int is_todo ); extern int winetest_loop_todo(void); extern void winetest_end_todo(void); @@ -97,6 +98,7 @@ extern void __winetest_cdecl winetest_trace( const char *msg, ... ) __WINE_PRINT
#ifdef WINETEST_NO_LINE_NUMBERS # define subtest_(file, line) (winetest_set_location(file, 0), 0) ? (void)0 : winetest_subtest +# define ignore_exceptions_(file, line) (winetest_set_location(file, 0), 0) ? (void)0 : winetest_ignore_exceptions # define ok_(file, line) (winetest_set_location(file, 0), 0) ? (void)0 : winetest_ok # define skip_(file, line) (winetest_set_location(file, 0), 0) ? (void)0 : winetest_skip # define win_skip_(file, line) (winetest_set_location(file, 0), 0) ? (void)0 : winetest_win_skip @@ -104,6 +106,7 @@ extern void __winetest_cdecl winetest_trace( const char *msg, ... ) __WINE_PRINT # define wait_child_process_(file, line) (winetest_set_location(file, 0), 0) ? (void)0 : winetest_wait_child_process #else # define subtest_(file, line) (winetest_set_location(file, line), 0) ? (void)0 : winetest_subtest +# define ignore_exceptions_(file, line) (winetest_set_location(file, line), 0) ? (void)0 : winetest_ignore_exceptions # define ok_(file, line) (winetest_set_location(file, line), 0) ? (void)0 : winetest_ok # define skip_(file, line) (winetest_set_location(file, line), 0) ? (void)0 : winetest_skip # define win_skip_(file, line) (winetest_set_location(file, line), 0) ? (void)0 : winetest_win_skip @@ -112,6 +115,7 @@ extern void __winetest_cdecl winetest_trace( const char *msg, ... ) __WINE_PRINT #endif
#define subtest subtest_(__FILE__, __LINE__) +#define ignore_exceptions ignore_exceptions_(__FILE__, __LINE__) #define ok ok_(__FILE__, __LINE__) #define skip skip_(__FILE__, __LINE__) #define win_skip win_skip_(__FILE__, __LINE__) @@ -298,6 +302,14 @@ void winetest_subtest( const char* name ) data->current_file, data->current_line, winetest_elapsed(), name ); }
+void winetest_ignore_exceptions( BOOL ignore ) +{ + struct tls_data *data = get_tls_data(); + printf( "%s:%d:%s IgnoreExceptions=%d\n", + data->current_file, data->current_line, winetest_elapsed(), + ignore ? 1 : 0 ); +} + int broken( int condition ) { return (strcmp(winetest_platform, "windows") == 0) && condition;
test_ExitCode() has one test that makes sure winedbg is non-interactive when ShowCrashDialog is 0. This causes winedbg to output an "unhandled exception" message which should not be counted as a test failure.
Signed-off-by: Francois Gouget fgouget@codeweavers.com --- dlls/kernel32/tests/debugger.c | 2 ++ 1 file changed, 2 insertions(+)
diff --git a/dlls/kernel32/tests/debugger.c b/dlls/kernel32/tests/debugger.c index 118984eec75..af9f8250e19 100644 --- a/dlls/kernel32/tests/debugger.c +++ b/dlls/kernel32/tests/debugger.c @@ -754,7 +754,9 @@ static void test_ExitCode(void) reg_save_value crash_dlg_value; save_value(hkeyWinedbg, "ShowCrashDialog", &crash_dlg_value); RegSetValueExA(hkeyWinedbg, "ShowCrashDialog", 0, REG_DWORD, (BYTE *)&zero, sizeof(DWORD)); + ignore_exceptions(TRUE); crash_and_winedbg(hkey, test_exe); + ignore_exceptions(FALSE); restore_value(hkeyWinedbg, &crash_dlg_value); RegCloseKey(hkeyWinedbg); }
Hi,
While running your changed tests, I think I found new failures. Being a bot and all I'm not very good at pattern recognition, so I might be wrong, but could you please double-check?
Full results can be found at: https://testbot.winehq.org/JobDetails.pl?Key=85502
Your paranoid android.
=== w2008s64 (32 bit report) ===
kernel32: debugger: Timeout
=== w7u_2qxl (32 bit report) ===
kernel32: debugger.c:988: Test failed: ole32.dll was not reported
=== w7u_adm (32 bit report) ===
kernel32: debugger.c:988: Test failed: ole32.dll was not reported
=== w7u_el (32 bit report) ===
kernel32: debugger.c:988: Test failed: ole32.dll was not reported
=== wvistau64 (64 bit report) ===
kernel32: debugger: Timeout
=== w2008s64 (64 bit report) ===
kernel32: debugger: Timeout
=== w10pro64 (64 bit report) ===
kernel32: debugger.c:153: Test failed: unable to open 'C:\Users\winetest\AppData\Local\Temp\wt1770.tmp' debugger.c:153: Test failed: failed to open: C:\Users\winetest\AppData\Local\Temp\wt1770.tmp debugger.c:665: Test failed: the child and debugged pids don't match: 1280 != 7112
=== w10pro64_he (64 bit report) ===
kernel32: debugger.c:153: Test failed: unable to open 'C:\Users\winetest\AppData\Local\Temp\wtEDB0.tmp' debugger.c:153: Test failed: failed to open: C:\Users\winetest\AppData\Local\Temp\wtEDB0.tmp debugger.c:665: Test failed: the child and debugged pids don't match: 8140 != 8004
On Fri, 12 Feb 2021, Marvin wrote: [...]
=== w2008s64 (32 bit report) === === wvistau64 (64 bit report) === === w2008s64 (64 bit report) ===
kernel32: debugger: Timeout
That's a recent failure but not caused by this patch. The screenshot shows the cause: kernel32.dll is missing K32GetMappedFileNameW().
So this is caused by ea33192660e8.
=== w7u_2qxl (32 bit report) === === w7u_adm (32 bit report) === === w7u_el (32 bit report) ===
kernel32: debugger.c:988: Test failed: ole32.dll was not reported
Same source.
=== w10pro64 (64 bit report) === === w10pro64_he (64 bit report) ===
kernel32: debugger.c:153: Test failed: unable to open 'C:\Users\winetest\AppData\Local\Temp\wt1770.tmp' debugger.c:153: Test failed: failed to open: C:\Users\winetest\AppData\Local\Temp\wt1770.tmp debugger.c:665: Test failed: the child and debugged pids don't match: 1280 != 7112
This happens from time to time: https://test.winehq.org/data/d73df9e4e1e8ca59d7b517369f4ef608ba9a8962/win10_...