Justin Cohen 9c1719802f ios: Replace RawLog FileHandler instead of using freopen for tests.
Previous commits[1][2] modified tests to require looking at RawLog
output to validate the success or failure of the iOS InHandlerProcess.
Previously this would use freopen to direct the RawLog to a file.
However, freopen introduces a race where the log file may not be
associated with stderr, and instead may interfere with the
InProcessHandler's cached writer fd. This caused flake with the
intermediate dumps sometimes including stderr logging.

Since the test fixtures only needs to know about the output of RawLog,
instead add a crashpad::internal::SetFileHandleForTesting method to
that swaps out STDERR_FILENO with the test fixture's fd.

[1] https://crrev.com/c/3488826
[2] https://crrev.com/c/3401563

Change-Id: I87b1020db6b896a47bec5a7c916a572c192b884f
Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/3517773
Reviewed-by: Joshua Peraza <jperaza@chromium.org>
Commit-Queue: Justin Cohen <justincohen@chromium.org>
2022-03-15 17:10:30 +00:00
..
2021-10-13 21:23:34 +00:00
2021-09-21 15:09:44 +00:00
2022-01-19 20:21:19 +00:00
2022-01-19 20:21:19 +00:00
2022-01-19 20:21:19 +00:00
2022-01-19 20:21:19 +00:00
2022-01-19 20:21:19 +00:00
2022-01-19 20:21:19 +00:00
2022-01-19 20:21:19 +00:00
2022-01-19 20:21:19 +00:00
2022-01-19 20:21:19 +00:00
2022-01-19 20:21:19 +00:00
2022-01-19 20:21:19 +00:00