diff options
author | Narayan Kamath <narayan@google.com> | 2017-05-24 15:07:25 +0100 |
---|---|---|
committer | Narayan Kamath <narayan@google.com> | 2017-05-31 10:35:32 +0100 |
commit | a73df601b7fe192001f4b9b5ddeb17b8efe3981b (patch) | |
tree | 268e9df211bc6e81391f8e121e9ccde25c70b26c /debuggerd/client/debuggerd_client_test.cpp | |
parent | 844940d751be6cf6078c9e816fc09356034c1b26 (diff) |
tombstoned: allow intercepts for java traces.
All intercept requests and crash dump requests must now specify a
dump_type, which can be one of kDebuggerdNativeBacktrace,
kDebuggerdTombstone or kDebuggerdJavaBacktrace. Each process can have
only one outstanding intercept registered at a time.
There's only one non-trivial change in this changeset; and that is
to crash_dump. We now pass the type of dump via a command line
argument instead of inferring it from the (resent) signal, this allows
us to connect to tombstoned before we wait for the signal as the
protocol requires.
Test: debuggerd_test
Change-Id: I189b215acfecd08ac52ab29117e3465da00e3a37
Diffstat (limited to 'debuggerd/client/debuggerd_client_test.cpp')
-rw-r--r-- | debuggerd/client/debuggerd_client_test.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/debuggerd/client/debuggerd_client_test.cpp b/debuggerd/client/debuggerd_client_test.cpp index 8f97db1fa..8420f038f 100644 --- a/debuggerd/client/debuggerd_client_test.cpp +++ b/debuggerd/client/debuggerd_client_test.cpp @@ -67,7 +67,8 @@ TEST(debuggerd_client, race) { // Wait for a bit to let the child spawn all of its threads. std::this_thread::sleep_for(250ms); - ASSERT_TRUE(debuggerd_trigger_dump(forkpid, std::move(pipe_write), kDebuggerdBacktrace, 10000)); + ASSERT_TRUE( + debuggerd_trigger_dump(forkpid, kDebuggerdNativeBacktrace, 10000, std::move(pipe_write))); // Immediately kill the forked child, to make sure that the dump didn't return early. ASSERT_EQ(0, kill(forkpid, SIGKILL)) << strerror(errno); @@ -107,5 +108,6 @@ TEST(debuggerd_client, no_timeout) { unique_fd output_read, output_write; ASSERT_TRUE(Pipe(&output_read, &output_write)); - ASSERT_TRUE(debuggerd_trigger_dump(forkpid, std::move(output_write), kDebuggerdBacktrace, 0)); + ASSERT_TRUE( + debuggerd_trigger_dump(forkpid, kDebuggerdNativeBacktrace, 0, std::move(output_write))); } |