View Issue Details [ Jump to Notes ] | [ Print ] | ||||||||
ID | Project | Category | View Status | Date Submitted | Last Update | ||||
0014077 | CMake | CMake | public | 2013-04-12 13:40 | 2016-06-10 14:31 | ||||
Reporter | Jean-Christophe Fillion-Robin | ||||||||
Assigned To | Kitware Robot | ||||||||
Priority | normal | Severity | feature | Reproducibility | have not tried | ||||
Status | closed | Resolution | moved | ||||||
Platform | OS | OS Version | |||||||
Product Version | CMake 2.8.10.2 | ||||||||
Target Version | Fixed in Version | ||||||||
Summary | 0014077: Teach RESOURCE_LOCK to use file | ||||||||
Description | See http://www.cmake.org/cmake/help/v2.8.10/cmake.html#prop_test:RESOURCE_LOCK [^] By using file, it would then be easy to ensure resources are lock across different ctest. This would be particularly useful when setting up multiple Dashboard or CDash@Home client on the same workstation. | ||||||||
Tags | No tags attached. | ||||||||
Attached Files | |||||||||
Relationships | |
Relationships |
Notes | |
(0032820) Jean-Christophe Fillion-Robin (reporter) 2013-04-12 14:40 |
The interesting code snippets are: cmCTestMultiProcessHandler::LockResources [1] cmCTestMultiProcessHandler::UnlockResources [1] Check if resource if locked in "cmCTestMultiProcessHandler::StartTest" [2] Possible implementation ======================= 1)Add an additional property named "RESOURCE_LOCK_DIRECTORY" and/or Add a global variable named "CTEST_RESOURCE_LOCK_DIRECTORY that could be set in CTest script. 2) If "RESOURCE_LOCK_DIRECTORY" is set, each time a resources is locked/unlocked, associated file would be created/removed from that directory. 3) The code checking if a resource is locked could be factored out into a function named "CheckLockedResources" [2] 4) Within this new "CheckLockedResources(int)" function, in addition to check if a resource is in the "LockedResources" vector, the file system could be verified for presence of a lock file. [1] https://github.com/Kitware/CMake/blob/324780697c5020a027efdc24bd9cc2fc926a3546/Source/CTest/cmCTestMultiProcessHandler.cxx#L149-168 [^] [2] https://github.com/Kitware/CMake/blob/324780697c5020a027efdc24bd9cc2fc926a3546/Source/CTest/cmCTestMultiProcessHandler.cxx#L197-206 [^] |
(0032821) Brad King (manager) 2013-04-12 15:10 |
Some operating systems may provide dedicated system-wide lock APIs that may be worth investigating. For lock files, creation will need to be done with CreateFile's CREATE_NEW on windows and open's O_CREAT|O_EXCL on POSIX to ensure atomic locks. Alternatively I think mkdir() may work if we use subdirectories as locks. |
(0042266) Kitware Robot (administrator) 2016-06-10 14:28 |
Resolving issue as `moved`. This issue tracker is no longer used. Further discussion of this issue may take place in the current CMake Issues page linked in the banner at the top of this page. |
Notes |
Issue History | |||
Date Modified | Username | Field | Change |
2013-04-12 13:40 | Jean-Christophe Fillion-Robin | New Issue | |
2013-04-12 14:40 | Jean-Christophe Fillion-Robin | Note Added: 0032820 | |
2013-04-12 15:10 | Brad King | Note Added: 0032821 | |
2013-04-12 15:10 | Brad King | Status | new => backlog |
2016-06-10 14:28 | Kitware Robot | Note Added: 0042266 | |
2016-06-10 14:28 | Kitware Robot | Status | backlog => resolved |
2016-06-10 14:28 | Kitware Robot | Resolution | open => moved |
2016-06-10 14:28 | Kitware Robot | Assigned To | => Kitware Robot |
2016-06-10 14:31 | Kitware Robot | Status | resolved => closed |
Issue History |
Copyright © 2000 - 2018 MantisBT Team |