]> git.apps.os.sepia.ceph.com Git - ceph.git/commit
cmake: resurrect mutex debugging in all Debug builds 45898/head
authorIlya Dryomov <idryomov@gmail.com>
Wed, 13 Apr 2022 13:42:21 +0000 (15:42 +0200)
committerIlya Dryomov <idryomov@gmail.com>
Wed, 13 Apr 2022 13:42:21 +0000 (15:42 +0200)
commit226e614c95f1a1dcd79fa2011012ced1de19e6d3
treed57e5966846846f677780c3c36b43898b87b66bf
parent3c556878cf917850504ef1d3b931d838cef38746
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>
CMakeLists.txt
src/CMakeLists.txt