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
(cherry picked from commit a5199a9e43
)
This commit is contained in:
parent
49ab678930
commit
845a2f9b4a
|
@ -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)");
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue