mirror of
https://github.com/chromium/crashpad.git
synced 2024-12-27 15:32:10 +08:00
9c1719802f
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>