summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristopher Ferris <cferris@google.com>2024-03-06 12:56:12 -0800
committerChristopher Ferris <cferris@google.com>2024-03-06 13:35:57 -0800
commitfb76a84de4ad61b62bdc92cbd179cfa07b5a66bb (patch)
treec06737884bb803a4c937e8c4e0694f5f0bb1c743
parent3f39dce166f9427b91651484004ca785b0b67ad7 (diff)
downloadunwinding-fb76a84de4ad61b62bdc92cbd179cfa07b5a66bb.tar.gz
Prevent tombstones from unsafe memory death test.
Test: Run tests, no tombstones produced. Change-Id: I1631639c4c05d7c82c78efd2e04eac8711ab1b7a
-rw-r--r--libunwindstack/tests/MemoryLocalUnsafeTest.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/libunwindstack/tests/MemoryLocalUnsafeTest.cpp b/libunwindstack/tests/MemoryLocalUnsafeTest.cpp
index fdd5614..052c668 100644
--- a/libunwindstack/tests/MemoryLocalUnsafeTest.cpp
+++ b/libunwindstack/tests/MemoryLocalUnsafeTest.cpp
@@ -20,6 +20,7 @@
#include <vector>
+#include <android-base/silent_death_test.h>
#include <gtest/gtest.h>
#include "MemoryLocalUnsafe.h"
@@ -50,7 +51,8 @@ TEST(MemoryLocalUnsafeTest, read_smoke) {
}
}
-TEST(MemoryLocalUnsafeTest, read_crash) {
+using MemoryLocalUnsafeDeathTest = SilentDeathTest;
+TEST_F(MemoryLocalUnsafeDeathTest, read_crash) {
void* mapping =
mmap(nullptr, getpagesize(), PROT_READ | PROT_WRITE, MAP_PRIVATE | MAP_ANONYMOUS, -1, 0);
ASSERT_NE(MAP_FAILED, mapping);