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

Commit e7ae4f9d authored by Josh Gao's avatar Josh Gao Committed by android-build-merger
Browse files

Merge "debuggerd_client_test: massively increase timeouts."

am: ecc9b1bd

Change-Id: Ibdaebf263dd0032e60240695ebb799f4a3e62989
parents 0b5678e0 ecc9b1bd
Loading
Loading
Loading
Loading
+3 −3
Original line number Original line Diff line number Diff line
@@ -73,15 +73,15 @@ TEST(debuggerd_client, race) {
  unique_fd pipe_read, pipe_write;
  unique_fd pipe_read, pipe_write;
  ASSERT_TRUE(Pipe(&pipe_read, &pipe_write));
  ASSERT_TRUE(Pipe(&pipe_read, &pipe_write));


  // 64 kB should be enough for everyone.
  // 64 MiB should be enough for everyone.
  constexpr int PIPE_SIZE = 64 * 1024 * 1024;
  constexpr int PIPE_SIZE = 64 * 1024 * 1024;
  ASSERT_EQ(PIPE_SIZE, fcntl(pipe_read.get(), F_SETPIPE_SZ, PIPE_SIZE));
  ASSERT_EQ(PIPE_SIZE, fcntl(pipe_read.get(), F_SETPIPE_SZ, PIPE_SIZE));


  // Wait for a bit to let the child spawn all of its threads.
  // Wait for a bit to let the child spawn all of its threads.
  std::this_thread::sleep_for(250ms);
  std::this_thread::sleep_for(1s);


  ASSERT_TRUE(
  ASSERT_TRUE(
      debuggerd_trigger_dump(forkpid, kDebuggerdNativeBacktrace, 10000, std::move(pipe_write)));
      debuggerd_trigger_dump(forkpid, kDebuggerdNativeBacktrace, 60000, std::move(pipe_write)));
  // Immediately kill the forked child, to make sure that the dump didn't return early.
  // Immediately kill the forked child, to make sure that the dump didn't return early.
  ASSERT_EQ(0, kill(forkpid, SIGKILL)) << strerror(errno);
  ASSERT_EQ(0, kill(forkpid, SIGKILL)) << strerror(errno);