From: Patrick Donnelly Date: Mon, 30 Sep 2024 13:53:09 +0000 (-0400) Subject: common/test: do not test exception raised from recursive lock X-Git-Tag: v20.0.0~885^2~1 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=84ebb30ea94bea60a5ff93f1a6b334000455da82;p=ceph.git common/test: do not test exception raised from recursive lock The C++ standard does not require that implementations raise std::system_error when double-locking a non-recursive lock. Our implementation of debug_mutex now catches this error with a ceph_assert so it cannot be caught. Signed-off-by: Patrick Donnelly --- diff --git a/src/test/common/test_mutex_debug.cc b/src/test/common/test_mutex_debug.cc index 565dcd64de9c..29eb8076859c 100644 --- a/src/test/common/test_mutex_debug.cc +++ b/src/test/common/test_mutex_debug.cc @@ -65,7 +65,6 @@ TEST(MutexDebug, NotRecursive) { ASSERT_TRUE(m.is_locked()); ASSERT_FALSE(std::async(std::launch::async, ttl, &m).get()); - ASSERT_THROW(m.lock(), std::system_error); ASSERT_TRUE(m.is_locked()); ASSERT_FALSE(std::async(std::launch::async, ttl, &m).get());