Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 3cd69027 authored by Christopher Ferris's avatar Christopher Ferris
Browse files

Increase timeouts.

There is still some flakiness, so increase the timeout values.
Also remove the TEMP_FAILURE_RETRY macro usage in TIMEOUT calls.
That macro disables the ability of the alarm code to interrupt
the system call.

Bug: 141045754
Bug: 149562320

Test: Unit tests pass.
Change-Id: Ia3c95dccc3076a3fd5ef6432097a57e4ccee4df3
Merged-In: Ia3c95dccc3076a3fd5ef6432097a57e4ccee4df3
(cherry picked from commit 11555f09)
parent 7d79742f
Loading
Loading
Loading
Loading
+2 −4
Original line number Diff line number Diff line
@@ -195,9 +195,7 @@ void CrasherTest::StartIntercept(unique_fd* output_fd, DebuggerdDumpType interce
void CrasherTest::FinishIntercept(int* result) {
  InterceptResponse response;

  // Timeout for tombstoned intercept is 10 seconds.
  ssize_t rc =
      TIMEOUT(20, TEMP_FAILURE_RETRY(read(intercept_fd.get(), &response, sizeof(response))));
  ssize_t rc = TIMEOUT(30, read(intercept_fd.get(), &response, sizeof(response)));
  if (rc == -1) {
    FAIL() << "failed to read response from tombstoned: " << strerror(errno);
  } else if (rc == 0) {
@@ -244,7 +242,7 @@ void CrasherTest::FinishCrasher() {

void CrasherTest::AssertDeath(int signo) {
  int status;
  pid_t pid = TIMEOUT(10, TEMP_FAILURE_RETRY(waitpid(crasher_pid, &status, 0)));
  pid_t pid = TIMEOUT(30, waitpid(crasher_pid, &status, 0));
  if (pid != crasher_pid) {
    printf("failed to wait for crasher (expected pid %d, return value %d): %s\n", crasher_pid, pid,
           strerror(errno));