From 4cba155da9c998f0bcc3a22a7e78618a683dd261 Mon Sep 17 00:00:00 2001 From: Christopher Ferris Date: Wed, 26 Jun 2019 15:08:51 -0700 Subject: [PATCH] Increase timeout to avoid flaky tests. Also, print extra information when an error occurs. Bug: 149562320 Test: Ran unit tests. Change-Id: I3404549db0ac18a4a82a99b2620556db96376bca Merged-In: I3404549db0ac18a4a82a99b2620556db96376bca (cherry picked from commit afc0ff7fe06aee9822fac97e52d1fba09c695d8b) --- debuggerd/debuggerd_test.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/debuggerd/debuggerd_test.cpp b/debuggerd/debuggerd_test.cpp index 64df53e9e..1f0e4201e 100644 --- a/debuggerd/debuggerd_test.cpp +++ b/debuggerd/debuggerd_test.cpp @@ -243,9 +243,10 @@ void CrasherTest::FinishCrasher() { void CrasherTest::AssertDeath(int signo) { int status; - pid_t pid = TIMEOUT(5, waitpid(crasher_pid, &status, 0)); + pid_t pid = TIMEOUT(10, waitpid(crasher_pid, &status, 0)); if (pid != crasher_pid) { - printf("failed to wait for crasher (pid %d)\n", crasher_pid); + printf("failed to wait for crasher (expected pid %d, return value %d): %s\n", crasher_pid, pid, + strerror(errno)); sleep(100); FAIL() << "failed to wait for crasher: " << strerror(errno); }