diff options
author | Josh Gao <jmgao@google.com> | 2017-04-03 13:18:34 -0700 |
---|---|---|
committer | Josh Gao <jmgao@google.com> | 2017-04-03 13:18:34 -0700 |
commit | a5199a9e43f865a08df12b3c89371ee3c85d6cc6 (patch) | |
tree | 4eca8248ee547b30ffbda2bddcdb0a377133c828 /debuggerd/debuggerd_test.cpp | |
parent | 8aae1b158ad45bd3a7eeace9558ee7390b12fa94 (diff) |
debuggerd_test: add test for process/thread names.
Make sure that we can get the process/thread names for nondumpable
processes with capabilities.
Bug: http://b/36237221
Test: /data/nativetest/debuggerd_test/debuggerd_test32
Change-Id: Iedd4eae18065c2e64abeebff15e3b9b09a630550
Diffstat (limited to 'debuggerd/debuggerd_test.cpp')
-rw-r--r-- | debuggerd/debuggerd_test.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/debuggerd/debuggerd_test.cpp b/debuggerd/debuggerd_test.cpp index 1befcb190..fa2838ee0 100644 --- a/debuggerd/debuggerd_test.cpp +++ b/debuggerd/debuggerd_test.cpp @@ -479,6 +479,7 @@ TEST_F(CrasherTest, capabilities) { err(1, "failed to drop ambient capabilities"); } + pthread_setname_np(pthread_self(), "thread_name"); raise(SIGSYS); }); @@ -492,6 +493,7 @@ TEST_F(CrasherTest, capabilities) { FinishIntercept(&intercept_result); ASSERT_EQ(1, intercept_result) << "tombstoned reported failure"; ConsumeFd(std::move(output_fd), &result); + ASSERT_MATCH(result, R"(name: thread_name\s+>>> .+debuggerd_test(32|64) <<<)"); ASSERT_MATCH(result, R"(#00 pc [0-9a-f]+\s+ /system/lib)" ARCH_SUFFIX R"(/libc.so \(tgkill)"); } |