Merge "debuggerd_test: add test for process/thread names." am: ca8954f7b8
am: 330b6fd878
Change-Id: I93fbfe223941b9e7bb9f599f857ec38007415359
diff --git a/debuggerd/debuggerd_test.cpp b/debuggerd/debuggerd_test.cpp
index 1befcb1..fa2838e 100644
--- a/debuggerd/debuggerd_test.cpp
+++ b/debuggerd/debuggerd_test.cpp
@@ -479,6 +479,7 @@
err(1, "failed to drop ambient capabilities");
}
+ pthread_setname_np(pthread_self(), "thread_name");
raise(SIGSYS);
});
@@ -492,6 +493,7 @@
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)");
}