Valgrind integration
As discussed in Tango Kernel meeting on 22-10-2020, it would be good for code quality and safety to integrate some tools and checkers, including Valgrind (memcheck). Things to consider:
- we need suppression file or other way to silence false positives
- with our setup it makes sense to use environment variables to enable valgrind, maybe:
env TANGO_VALGRIND_SERVER=1 TANGO_VALGRIND_CLIENT=1 ctest -R cxx_dserver_misc - Valgrind could be enabled here (client): https://github.com/tango-controls/cppTango/blob/1945e6592f6d2922181bce2da235fd99f38f6b11/cpp_test_suite/environment/run_with_fixture.sh.cmake#L46
- and here (server): https://github.com/tango-controls/cppTango/blob/1945e6592f6d2922181bce2da235fd99f38f6b11/cpp_test_suite/environment/start_server.sh.cmake#L19-L20
- In both cases Valgrind failure should impact process exit code (they have a parameter for that), and such test should be considered failed
- We need to store job artifacts somewhere to be able to access device server logs in case of failure
- We need to consider potential test timeout problems when running with Valgrind, some of the tests may need to be excluded
- We need to change how the device servers are stopped at the end of each test. Currently this is done from a detached job that runs in parallel with the next test, so we don't see exit codes: https://github.com/tango-controls/cppTango/blob/1945e6592f6d2922181bce2da235fd99f38f6b11/cpp_test_suite/environment/run_with_fixture.sh.cmake#L21-L29
- Finally we need a CI job with Valgrind enabled
Edited by Reynald Bourtembourg