Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(648)

Unified Diff: util/test/multiprocess_exec_test.cc

Issue 799083003: util_test: Don’t crash when run from the wrong location (Closed) Base URL: https://chromium.googlesource.com/crashpad/crashpad@master
Patch Set: Address review feedback, round 2 Created 6 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « util/net/http_transport_test.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: util/test/multiprocess_exec_test.cc
diff --git a/util/test/multiprocess_exec_test.cc b/util/test/multiprocess_exec_test.cc
index c30843ed51dda7c7dec49d4ceeaa985837eaad66..ecadc4444cd8454145f95405a5b3eb159900e1fb 100644
--- a/util/test/multiprocess_exec_test.cc
+++ b/util/test/multiprocess_exec_test.cc
@@ -33,10 +33,13 @@ class TestMultiprocessExec final : public MultiprocessExec {
private:
void MultiprocessParent() override {
+ // Use Logging*FD() instead of Checked*FD() so that the test can fail
+ // gracefully with a gtest assertion if the child does not execute properly.
+
char c = 'z';
- CheckedWriteFD(WritePipeFD(), &c, 1);
+ ASSERT_TRUE(LoggingWriteFD(WritePipeFD(), &c, 1));
- CheckedReadFD(ReadPipeFD(), &c, 1);
+ ASSERT_TRUE(LoggingReadFD(ReadPipeFD(), &c, 1));
EXPECT_EQ('Z', c);
}
« no previous file with comments | « util/net/http_transport_test.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698