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

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: 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..855f84729232e9a92abd94563b4fed4185ae0ed7 100644
--- a/util/test/multiprocess_exec_test.cc
+++ b/util/test/multiprocess_exec_test.cc
@@ -36,7 +36,10 @@ class TestMultiprocessExec final : public MultiprocessExec {
char c = 'z';
CheckedWriteFD(WritePipeFD(), &c, 1);
Robert Sesek 2014/12/15 19:41:18 Change this to a LoggingX?
- CheckedReadFD(ReadPipeFD(), &c, 1);
+ // Use LoggingReadFD() instead of CheckedReadFD() for the first read so that
+ // the test can fail gracefully with a gtest assertion if the child does not
+ // execute properly.
+ 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