[vtk-developers] print a stacktrace if a ctest crashes

burlen burlen.loring at gmail.com
Thu Jun 20 03:46:14 EDT 2013


Hi All,

I'd like to request a code review of a patch that enables printing a 
stacktrace for VTK's cxx and python tests if they crash. It works by 
catching a handful of POSIX signals that are indicative of catastrophic 
program failure such as SEGV. The feature could help diagnose tests' 
segfaults without having to log into the dashboard system where the test 
crashes.

The signal handler and stacktrace capabilities are already provided by 
KWSys so the modification to VTK is quite small. For python tests the 
changes are straightforward.  For the cxx tests I settled on adding a 
small code snippet to test drivers via the 
CMAKE_TESTDRIVER_BEFORE_TESTMAIN variable. I found out that this 
variable is also used to setup object factories for tests that need them 
and was able with some care to work harmoniously with the factory code. 
Does anyone see anything wrong with this approach? Please let me know if 
there's a better way, or any other comments.

http://review.source.kitware.com/#/t/2905/

Thanks
Burlen



More information about the vtk-developers mailing list