On Thu, Jun 14, 2007 at 06:28:41PM -0700, Dan Hipschman wrote:
- if (strcmp(winetest_platform, "wine") != 0) /* crashes wine */
- {
- eu.t = ENCU_I;
- eu.tagged_union.i = 7;
- ok(square_encu(&eu) == 49.0, "RPC square_encu\n");
- eu.t = ENCU_F;
- eu.tagged_union.f = 3.0;
- ok(square_encu(&eu) == 9.0, "RPC square_encu\n");
- }
Hi. So, I realize the usual way to handle tests that crash wine (besides fixing the bug that causes the crash), is to "if (0)" or comment the test out, as in ntdll/tests/reg.c, or rpcrt4/tests/ndr_marshall.c, but this patch tests more than wine, it also tests widl, and it's therefore not just documentation. If I "if (0)" the test out (or worse, it doesn't get accepted), I'm going to have to edit the test each time I run it on windows to re-add the encapsulated union test so I can verify that the widl output stubs still work on windows. One solution is to do something like this:
#ifndef TESTS_THAT_CRASH_WINE # define TESTS_THAT_CRASH_WINE 0 #endif
...
if (TESTS_THAT_CRASH_WINE) { eu.t = ENCU_I; eu.tagged_union.i = 7; ok(square_encu(&eu) == 49.0, "RPC square_encu\n");
eu.t = ENCU_F; eu.tagged_union.f = 3.0; ok(square_encu(&eu) == 9.0, "RPC square_encu\n"); }
So at least I can just compile with -DTESTS_THAT_CRASH_WINE=1 on windows, which is easy to stick in a batch file or something. Otherwise, I'm stuck maintaining a patch that has to be applied before each compile. Plus, it means I'm the only one who's probably testing encapsulated unions on windows, so it's only getting tested on one platform.
Any chance something like the original patch can get into wine?
Dan Hipschman dsh@linux.ucla.edu writes:
So at least I can just compile with -DTESTS_THAT_CRASH_WINE=1 on windows, which is easy to stick in a batch file or something. Otherwise, I'm stuck maintaining a patch that has to be applied before each compile. Plus, it means I'm the only one who's probably testing encapsulated unions on windows, so it's only getting tested on one platform.
Any chance something like the original patch can get into wine?
I'd strongly suggest to fix the crash instead of adding infrastructure to work around it.