]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
test/osd: Adapt strategy for testing asserts in interval_sets 62496/head
authorAlex Ainscow <aainscow@uk.ibm.com>
Tue, 25 Mar 2025 15:21:07 +0000 (15:21 +0000)
committerAlex Ainscow <aainscow@uk.ibm.com>
Tue, 25 Mar 2025 15:42:15 +0000 (15:42 +0000)
commitd7005063be287fd90892eb143251d5d81039913c
treec751ed9af6268bc3da5454daeeb126294b47e266
parent855faf1acd80d04c373cc1a2fb1c9fdbed0092b5
test/osd: Adapt strategy for testing asserts in interval_sets

Previously the strategy for testing interval_sets was to use a gtest
feature called "EXPECT_DEATH" This is, however, slow and creates
core dumps. Instead, we use a mechanism which replaces the
ceph_assert macro with a strict_assert, which behaves the same in
product code, but in the unit test can be tested using the faster
EXPECT_THROW() mechanism in gtest.

Signed-off-by: Alex Ainscow <aainscow@uk.ibm.com>
src/include/interval_set.h
src/test/common/test_interval_set.cc