Dynamic Analysis with tools other than valgrind

I have setup XRootD to use various sanitizers by setting the appropriate memory check tool, like this:

However, when I run the tests and they pass, I get annoying messages about the output of the memory checker not been found.

+ ctest --progress --output-on-failure --stop-on-failure -DSANITIZE=address -C RelWithDebInfo -V -S test.cmake
Run dashboard with model Experimental
   Source directory: /home/amadio/src/xrootd
   Build directory: /home/amadio/src/xrootd/build
   Group: Experimental
   Reading ctest configuration file: /home/amadio/src/xrootd/CTestConfig.cmake
   Site: gentoo.cern.ch
   Build name: Gentoo Linux Clang 21.1.8 RelWithDebInfo [AddressSanitizer]
   Use Experimental tag: 20260213-0832
   Updating GIT repository: /home/amadio/src/xrootd
   Old revision of repository is: da025b519612d90c8a7fb5c59de6b56405322741
   New revision of repository is: da025b519612d90c8a7fb5c59de6b56405322741
   Gathering version information (one . per revision):
    
Using CMake cache file gentoo.cmake
Configure project
   Each . represents 1024 bytes of output
    ..... Size of output: 4K
Build project
   Each symbol represents 1024 bytes of output.
    ..................................................  Size: 49K
    ........ Size of output: 57K
   0 Compiler errors
   0 Compiler warnings
Memory check project /home/amadio/src/xrootd/build
  0/169 MemCheck   #3: XrdCl::XrdClEnvTest.PointerCannot find memory tester output file: /home/amadio/src/xrootd/build/Testing/Temporary/MemoryChecker.1.log.*
  1/169 MemCheck   #4: XrdCl::URLTest.LocalURLsCannot find memory tester output file: /home/amadio/src/xrootd/build/Testing/Temporary/MemoryChecker.2.log.*
  2/169 MemCheck   #5: XrdCl::URLTest.RemoteURLsCannot find memory tester output file: /home/amadio/src/xrootd/build/Testing/Temporary/MemoryChecker.3.log.*
  3/169 MemCheck   #6: XrdCl::URLTest.InvalidURLsCannot find memory tester output file: /home/amadio/src/xrootd/build/Testing/Temporary/MemoryChecker.4.log.*
  4/169 MemCheck   #7: XrdCl::PollerTest.FunctionTestCannot find memory tester output file: /home/amadio/src/xrootd/build/Testing/Temporary/MemoryChecker.6.log.*
  5/169 MemCheck   #8: XrdCl::SocketTest.TransferTestCannot find memory tester output file: /home/amadio/src/xrootd/build/Testing/Temporary/MemoryChecker.125.log.*
...
(many other passing tests)
...
169/169 MemCheck #154: XRootD::cluster::stopCannot find memory tester output file: /home/amadio/src/xrootd/build/Testing/Temporary/MemoryChecker.154.log.*

100% tests passed, 0 tests failed out of 169

Total Test time (real) = 167.44 sec
-- Processing memory checking output:
MemCheck log files can be found here: (<#> corresponds to test number)
/home/amadio/src/xrootd/build/Testing/Temporary/MemoryChecker.<#>.log
Memory checking results:

These messages seem to be from here:

Is there a way to supress those messages? CMake is assuming that these output files will always be there, but when using the address sanitizer or other sanitizers, the output file will only be there if there is a problem, so we get a lot of noise for tests that actually pass the checks.

It would also be nice if CTest would by default behave more like our test.cmake script, for example by selecting the default generator, etc. It would make it much easier for projects to adopt dashboards in their CI workflows.

Thank you!

1 Like

I’m not sure who is the primary maintainer of the CDash support in CMake/CTest, but I’ll ping @zackgalbreath who probably knows.