SetErrorMode() in fastfail tests

Some versions of python call SetErrorMode which disables
WerFault handling for the fastfail test programs. We can
set this to a useful value, allowing these tests to run
again locally.

This does not enable the tests on the bots as they continue
to fail.

Bug: crashpad:458
Change-Id: Ibdd2f92ed872bd76490db32dccb2257dd91f8280
Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/4641231
Reviewed-by: Mark Mentovai <mark@chromium.org>
Commit-Queue: Alex Gough <ajgo@chromium.org>
This commit is contained in:
Alex Gough 2023-06-23 13:33:37 -07:00 committed by Crashpad LUCI CQ
parent 7e5b8ab50b
commit bc1e904f09

View File

@ -129,6 +129,10 @@ int CrashyMain(int argc, wchar_t* argv[]) {
return EXIT_FAILURE;
}
// Some versions of python call SetErrorMode() which extends to children, and
// prevents the WerFault infrastructure from running.
SetErrorMode(SEM_FAILCRITICALERRORS | SEM_NOOPENFILEERRORBOX);
if (type == L"cf")
CfgCrash();
if (type == L"ff")