From 84ebb30ea94bea60a5ff93f1a6b334000455da82 Mon Sep 17 00:00:00 2001 From: Patrick Donnelly Date: Mon, 30 Sep 2024 09:53:09 -0400 Subject: [PATCH] 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 --- src/test/common/test_mutex_debug.cc | 1 - 1 file changed, 1 deletion(-) diff --git a/src/test/common/test_mutex_debug.cc b/src/test/common/test_mutex_debug.cc index 565dcd64de9..29eb8076859 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()); -- 2.39.5