summaryrefslogtreecommitdiff
path: root/libunwindstack/tests/AndroidUnwinderTest.cpp
diff options
context:
space:
mode:
authorChristopher Ferris <cferris@google.com>2022-09-15 18:56:24 +0000
committerGerrit Code Review <noreply-gerritcodereview@google.com>2022-09-15 18:56:24 +0000
commitec865630a85e6c33b17d20380b8d9e3db7aaf66f (patch)
treec52c911dbd2c03a431370f8f1cc285e00e77b7b3 /libunwindstack/tests/AndroidUnwinderTest.cpp
parent3dd4fc7f0806d493eb8a13adc6c276e7db347c74 (diff)
parent93e6f89cb3310fa749e6f1703f5fe73d221d09e9 (diff)
downloadunwinding-ec865630a85e6c33b17d20380b8d9e3db7aaf66f.tar.gz
Merge "Add detailed error messages for remote unwinds."
Diffstat (limited to 'libunwindstack/tests/AndroidUnwinderTest.cpp')
-rw-r--r--libunwindstack/tests/AndroidUnwinderTest.cpp14
1 files changed, 14 insertions, 0 deletions
diff --git a/libunwindstack/tests/AndroidUnwinderTest.cpp b/libunwindstack/tests/AndroidUnwinderTest.cpp
index 02d20cf..1de9b42 100644
--- a/libunwindstack/tests/AndroidUnwinderTest.cpp
+++ b/libunwindstack/tests/AndroidUnwinderTest.cpp
@@ -412,4 +412,18 @@ TEST(AndroidRemoteUnwinderTest, suffix_ignore) {
}));
}
+TEST(AndroidRemoteUnwinderTest, remote_get_arch_ptrace_fails) {
+ AndroidRemoteUnwinder unwinder(getpid());
+ AndroidUnwinderData data;
+ ASSERT_FALSE(unwinder.Unwind(data));
+ EXPECT_EQ("Ptrace Call Failed", data.GetErrorString());
+}
+
+TEST(AndroidRemoteUnwinderTest, remote_get_ptrace_fails) {
+ AndroidRemoteUnwinder unwinder(getpid(), Regs::CurrentArch());
+ AndroidUnwinderData data;
+ ASSERT_FALSE(unwinder.Unwind(data));
+ EXPECT_EQ("Ptrace Call Failed", data.GetErrorString());
+}
+
} // namespace unwindstack