]> git.apps.os.sepia.ceph.com Git - ceph.git/commit
cmake: resurrect mutex debugging in all Debug builds 45913/head
authorIlya Dryomov <idryomov@gmail.com>
Wed, 13 Apr 2022 13:42:21 +0000 (15:42 +0200)
committerIlya Dryomov <idryomov@gmail.com>
Fri, 15 Apr 2022 09:28:47 +0000 (11:28 +0200)
commit96e50f1b82ef6b47f2bf8548625500dc7b8e87cf
tree84891fa050b2374d5963e19e7e81011d73b367f1
parent2c8d01fc744771bc800b99fb94ab792b6d2d4855
cmake: resurrect mutex debugging in all Debug builds

Commit 403f1ec2888a ("cmake: make "WITH_CEPH_DEBUG_MUTEX" depend on
CMAKE_BUILD_TYPE") made WITH_CEPH_DEBUG_MUTEX depend on build type
being set to Debug, in CMakeLists.txt.  However, if CMAKE_BUILD_TYPE
isn't specified by the user, we may still set it to Debug later, in
src/CMakeLists.txt, and in that case WITH_CEPH_DEBUG_MUTEX doesn't
get enabled.  The result is that

  $ do_cmake.sh -DCMAKE_BUILD_TYPE=Debug ...

debug builds have mutex debugging enabled, while

  $ do_cmake.sh ...

builds, which are supposed to be the same, don't.  Jenkins builders
don't pass -DCMAKE_BUILD_TYPE=Debug so that commit effectively turned
off all ceph_mutex_is_locked* asserts in "make check".

Fixes: https://tracker.ceph.com/issues/55318
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
(cherry picked from commit 226e614c95f1a1dcd79fa2011012ced1de19e6d3)
CMakeLists.txt
src/CMakeLists.txt