MantisBT - CMake
View Issue Details
0014303CMakeCTestpublic2013-07-23 02:232014-02-10 10:44
Rolf Eike Beer 
Rolf Eike Beer 
normalblockrandom
closedfixed 
CMake 2.8.12 
CMake 2.8.12 
0014303: Parallel memtest broken
Short version: memory checker output is redirected to a file, which will be the same for every test, even parallel ones. This has been broken forever. Valgrind is not affected in currently released versions because it did not redirect output to file there (which caused other issues), but in current master it does.

Details:

The filename is generated as:

this->MemoryTesterOutputFile = this->CTest->GetBinaryDir() + "/Testing/Temporary/MemoryChecker.log";

The simple (but correct) solution would be to include the test index into the filename, as that is guaranteed to be unique and to work on all filesystems as it is an ordinary integer. Sadly I have not yet found a way to access this index or anything that has it from within cmCTestMemCheckHandler::InitializeMemoryChecking().

Valgrind was switched to use the output files in dde6306. Since then running a parallel memcheck will happily screw the results, which is why I have noticed this at all in the first place. Sadly we have no testcase that would catch this, I only found it by manually inspecting the memchecker logs an noticing mixed results.
No tags attached.
Issue History
2013-07-23 02:23Rolf Eike BeerNew Issue
2013-07-23 02:23Rolf Eike BeerStatusnew => assigned
2013-07-23 02:23Rolf Eike BeerAssigned To => Rolf Eike Beer
2013-07-24 17:43Rolf Eike BeerNote Added: 0033596
2013-08-07 16:31Rolf Eike BeerNote Added: 0033679
2013-08-08 18:00Rolf Eike BeerNote Added: 0033689
2013-08-08 18:00Rolf Eike BeerStatusassigned => resolved
2013-08-08 18:00Rolf Eike BeerResolutionopen => fixed
2014-02-10 10:44Robert MaynardNote Added: 0035071
2014-02-10 10:44Robert MaynardStatusresolved => closed

Notes
(0033596)
Rolf Eike Beer   
2013-07-24 17:43   
I found out that this function is only called once, so there is no chance of adding a specific option here. We must have something that will be a "pattern", that will expanded then when the test is actually called, probably best suited in cmCTestRunTest::ComputeArguments().

I have no idea what this does, but the dpbdFile for BoundsChecker probably has the same problem.
(0033679)
Rolf Eike Beer   
2013-08-07 16:31   
Fix pushed to next, please review/test:

http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=6f9aaad150f769cd73df408514cf5dc42c020074 [^]
(0033689)
Rolf Eike Beer   
2013-08-08 18:00   
Branch merged to master.
(0035071)
Robert Maynard   
2014-02-10 10:44   
Closing resolved issues that have not been updated in more than 4 months.