summaryrefslogtreecommitdiffstats
path: root/tests/unit/rangeset_test.cpp
diff options
context:
space:
mode:
authorTao Bao <tbao@google.com>2018-06-05 23:03:34 +0200
committerTao Bao <tbao@google.com>2018-06-05 23:06:59 +0200
commit42be0d47d92086396decdbbd24d165ae340f9156 (patch)
tree4cd4048bcf55c08a212e3697cbb5b6e5542c367d /tests/unit/rangeset_test.cpp
parentMerge "updater_sample: Add UI docs to README" (diff)
downloadandroid_bootable_recovery-42be0d47d92086396decdbbd24d165ae340f9156.tar
android_bootable_recovery-42be0d47d92086396decdbbd24d165ae340f9156.tar.gz
android_bootable_recovery-42be0d47d92086396decdbbd24d165ae340f9156.tar.bz2
android_bootable_recovery-42be0d47d92086396decdbbd24d165ae340f9156.tar.lz
android_bootable_recovery-42be0d47d92086396decdbbd24d165ae340f9156.tar.xz
android_bootable_recovery-42be0d47d92086396decdbbd24d165ae340f9156.tar.zst
android_bootable_recovery-42be0d47d92086396decdbbd24d165ae340f9156.zip
Diffstat (limited to 'tests/unit/rangeset_test.cpp')
-rw-r--r--tests/unit/rangeset_test.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/tests/unit/rangeset_test.cpp b/tests/unit/rangeset_test.cpp
index 7ae193e18..fc72f2f6d 100644
--- a/tests/unit/rangeset_test.cpp
+++ b/tests/unit/rangeset_test.cpp
@@ -209,6 +209,7 @@ TEST(RangeSetTest, GetBlockNumber) {
ASSERT_EQ(static_cast<size_t>(6), rs.GetBlockNumber(5));
ASSERT_EQ(static_cast<size_t>(9), rs.GetBlockNumber(8));
+ ::testing::FLAGS_gtest_death_test_style = "threadsafe";
// Out of bound.
ASSERT_EXIT(rs.GetBlockNumber(9), ::testing::KilledBySignal(SIGABRT), "");
}
@@ -284,6 +285,8 @@ TEST(SortedRangeSetTest, file_range) {
ASSERT_EQ(static_cast<size_t>(10), rs.GetOffsetInRangeSet(4106));
ASSERT_EQ(static_cast<size_t>(40970), rs.GetOffsetInRangeSet(4096 * 16 + 10));
+
+ ::testing::FLAGS_gtest_death_test_style = "threadsafe";
// block#10 not in range.
ASSERT_EXIT(rs.GetOffsetInRangeSet(40970), ::testing::KilledBySignal(SIGABRT), "");
}