valgrind gives more detailed information when you run it with an unstripped binary (including line numbers in the call stack). -{section: How to use valgrind to check all the daemons for memory leaks} +{section: Running the test suite under valgrind} -valgrind can be told to follow all forked/execed children and where to dump -its output. So we'll do just that and start up the master. You can either be -root or a normal user for this, depending upon what you are testing. +=batch_test.pl= is the means by which the test suite is run. It can +be told to start up its own person condor and use that for testing. +The tests ran by =batch_test.pl= may also start their own personal +condors. + +In order to test all of these personal condors under valgrind, valgrind +can be told to follow all forked/execed children and where to dump its +output. So we'll do just that and start up the master. You can either +be root or a normal user for this, depending upon what you are testing. + +After the test suite codes are built, cd into =condor_tests/=. + +We'll invoke =batch_test.pl= under valgrind. We tell batch test to start up +its own personal condors and clean up everything when it is done. We don't +ask it to run tests in parallel since there likely are race conditions in +the tests over that behavior. + +We make sure to specify the logfile pattern in a valid and empty +directory. This is because valgrind will write a new log file with the +pid associated with it for *every* program executed under batch_test.pl. +You can put them into /tmp like I have here, but I would recommend you +put them into a special directory since there will be LOTS of log files. {verbatim} -valgrind --tool=memcheck --leak-check=yes --show-reachable=yes --leak-resolution=high --log-file=/tmp/valgrind.log --trace-children=true --num-callers=16 condor_master +valgrind --tool=memcheck --leak-check=yes --show-reachable=yes --leak-resolution=high --log-file=/tmp/valgrind.%p --trace-children=yes --num-callers=16 ./batch_test.pl -b -c {endverbatim} -After the daemons have come up, run the condor_tests test suite. - {section: How to use the google heap profiler} The google heap profiler is part of the google-perftools package, which may be easily downloaded and compiled. This example used version 0.98.