diff options
Diffstat (limited to 'libunwindstack/tests/MemoryRemoteTest.cpp')
-rw-r--r-- | libunwindstack/tests/MemoryRemoteTest.cpp | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/libunwindstack/tests/MemoryRemoteTest.cpp b/libunwindstack/tests/MemoryRemoteTest.cpp index e48edf7e5..f8965b2ce 100644 --- a/libunwindstack/tests/MemoryRemoteTest.cpp +++ b/libunwindstack/tests/MemoryRemoteTest.cpp | |||
@@ -31,10 +31,12 @@ | |||
31 | #include <android-base/file.h> | 31 | #include <android-base/file.h> |
32 | #include <gtest/gtest.h> | 32 | #include <gtest/gtest.h> |
33 | 33 | ||
34 | #include "Memory.h" | 34 | #include <unwindstack/Memory.h> |
35 | 35 | ||
36 | #include "MemoryFake.h" | 36 | #include "MemoryFake.h" |
37 | 37 | ||
38 | namespace unwindstack { | ||
39 | |||
38 | class MemoryRemoteTest : public ::testing::Test { | 40 | class MemoryRemoteTest : public ::testing::Test { |
39 | protected: | 41 | protected: |
40 | static uint64_t NanoTime() { | 42 | static uint64_t NanoTime() { |
@@ -91,6 +93,7 @@ TEST_F(MemoryRemoteTest, read) { | |||
91 | ASSERT_TRUE(Detach(pid)); | 93 | ASSERT_TRUE(Detach(pid)); |
92 | 94 | ||
93 | kill(pid, SIGKILL); | 95 | kill(pid, SIGKILL); |
96 | ASSERT_EQ(pid, wait(nullptr)); | ||
94 | } | 97 | } |
95 | 98 | ||
96 | TEST_F(MemoryRemoteTest, read_fail) { | 99 | TEST_F(MemoryRemoteTest, read_fail) { |
@@ -131,6 +134,7 @@ TEST_F(MemoryRemoteTest, read_fail) { | |||
131 | ASSERT_TRUE(Detach(pid)); | 134 | ASSERT_TRUE(Detach(pid)); |
132 | 135 | ||
133 | kill(pid, SIGKILL); | 136 | kill(pid, SIGKILL); |
137 | ASSERT_EQ(pid, wait(nullptr)); | ||
134 | } | 138 | } |
135 | 139 | ||
136 | TEST_F(MemoryRemoteTest, read_overflow) { | 140 | TEST_F(MemoryRemoteTest, read_overflow) { |
@@ -160,4 +164,7 @@ TEST_F(MemoryRemoteTest, read_illegal) { | |||
160 | ASSERT_TRUE(Detach(pid)); | 164 | ASSERT_TRUE(Detach(pid)); |
161 | 165 | ||
162 | kill(pid, SIGKILL); | 166 | kill(pid, SIGKILL); |
167 | ASSERT_EQ(pid, wait(nullptr)); | ||
163 | } | 168 | } |
169 | |||
170 | } // namespace unwindstack | ||