View Issue Details [ Jump to Notes ] | [ Print ] | ||||||||
ID | Project | Category | View Status | Date Submitted | Last Update | ||||
0012618 | CMake | CTest | public | 2011-12-10 16:58 | 2012-05-09 15:26 | ||||
Reporter | Sébastien Valat | ||||||||
Assigned To | Brad King | ||||||||
Priority | normal | Severity | minor | Reproducibility | always | ||||
Status | closed | Resolution | fixed | ||||||
Platform | x86_64 | OS | Linux | OS Version | Arch | ||||
Product Version | CMake 2.8.6 | ||||||||
Target Version | CMake 2.8.7 | Fixed in Version | CMake 2.8.7 | ||||||
Summary | 0012618: Slow execution of tests | ||||||||
Description | Tests execution is very slow if we didn't use CDash. time make test Running tests... Test project ....../project/build Start 1: svutDefaultMain 1/36 Test #1: svutDefaultMain .................. Passed 0.01 sec Start 2: svutDefaultMainXml 2/36 Test 0000002: svutDefaultMainXml ............... Passed 0.00 sec Start 3: svutDefaultMainStd 3/36 Test 0000003: svutDefaultMainStd ............... Passed 0.00 sec Start 4: svutDefaultMainStdColor 4/36 Test 0000004: svutDefaultMainStdColor .......... Passed 0.00 sec Start 5: svutStandeloneMain 5/36 Test 0000005: svutStandeloneMain ............... Passed 0.01 sec Start 6: svutStandeloneMainXml 6/36 Test 0000006: svutStandeloneMainXml ............ Passed 0.00 sec ...... (the longer one is 0.03 sec).... ....... real 0m10.473s user 0m0.060s sys 0m0.043s So take 10 seconds to execute 36 tests of ~0.01 seconds. The longer was to wait passing the first test. While tracing in GDB when waiting on first test : #0 0x00007fb64469ffff in pthread_join () from /lib/libpthread.so.0 #1 0x00007fb6451a6afe in Curl_thread_join () from /usr/lib/libcurl.so.4 0000002 0x00007fb6451a7ead in Curl_resolver_wait_resolv () from /usr/lib/libcurl.so.4 0000003 0x00007fb64518e53c in ?? () from /usr/lib/libcurl.so.4 0000004 0x000000000048d59d in cmCTest::HTTPRequest(std::string, cmCTest::HTTPMethod, std::string&, std::string, std::string, int) () 0000005 0x0000000000493ed0 in cmCTest::GetCDashVersion() () 0000006 0x000000000049408b in cmCTest::ShouldCompressTestOutput() () 0000007 0x000000000053e7a3 in cmCTestRunTest::EndTest(unsigned long, unsigned long, bool) () 0000008 0x0000000000530e3b in cmCTestMultiProcessHandler::CheckOutput() () #9 0x00000000005340a8 in cmCTestMultiProcessHandler::RunTests() () 0000010 0x00000000004f7f2b in cmCTestTestHandler::ProcessDirectory(std::vector<cmsys::String, std::allocator<cmsys::String> >&, std::vector<cmsys::String, std::allocator<cmsys::String> >&) () #11 0x00000000004f82fb in cmCTestTestHandler::ProcessHandler() () 0000012 0x0000000000495e9e in cmCTest::ProcessTests() () 0000013 0x0000000000498652 in cmCTest::Run(std::vector<std::string, std::allocator<std::string> >&, std::string*) () 0000014 0x0000000000486bdf in main () The problem came from : int res = cmCTest::HTTPRequest(url, cmCTest::HTTP_GET, response, "", "", 3); in GetCDashVersion(). When not using CDash on projects I only use "enable_testing()" in CMakeLists.txt so didn't set CDashDropSite (maybe this is a mistake, but what to setup if I didn't intend to use cdash ???). In such case, DropSite is empty, so requested url is "http:///api/getversion.php" [^] which lead to "http:" as domain lookup into curl. It finish by waiting the 3 second before timout ... for nothing. Partialy related to this commit : 41fcf6e1558cb3ef4639928f87d58531b45fe237. Maybe another one interfer with it by setting an empty drop site by default as I observe this bug for a couple of months. Also observed on a Gentoo, ubuntu x86_64. | ||||||||
Steps To Reproduce | Setup a project with fast tests and only setup "enable_tesing()" in CMakeLists.txt. Do not consider usage of cdash and simply compile and run tests : mkdir build cd build cmake .. make make test You will wait at least 3 seconds. | ||||||||
Additional Information | Suggest to simply add of if statement before starting the request and bypass this when drop site is empty. | ||||||||
Tags | No tags attached. | ||||||||
Attached Files | 0001-Fix-for-bug-12618-avoid-to-sleep-for-3-seconds-in-ct.patch [^] (1,103 bytes) 2011-12-10 17:09 [Show Content] | ||||||||
Relationships | |
Relationships |
Notes | |
(0027948) Brad King (manager) 2011-12-12 09:40 |
Applied, thanks! http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=52f937ae [^] |
(0029452) David Cole (manager) 2012-05-09 15:26 |
Closing resolved issues that have not been updated in more than 4 months. |
Notes |
Issue History | |||
Date Modified | Username | Field | Change |
2011-12-10 16:58 | Sébastien Valat | New Issue | |
2011-12-10 17:09 | Sébastien Valat | File Added: 0001-Fix-for-bug-12618-avoid-to-sleep-for-3-seconds-in-ct.patch | |
2011-12-12 09:40 | Brad King | Note Added: 0027948 | |
2011-12-12 09:40 | Brad King | Status | new => resolved |
2011-12-12 09:40 | Brad King | Resolution | open => fixed |
2011-12-12 09:40 | Brad King | Assigned To | => Brad King |
2011-12-16 17:27 | David Cole | Fixed in Version | => CMake 2.8.7 |
2011-12-16 17:27 | David Cole | Target Version | => CMake 2.8.7 |
2012-05-09 15:26 | David Cole | Note Added: 0029452 | |
2012-05-09 15:26 | David Cole | Status | resolved => closed |
Issue History |
Copyright © 2000 - 2018 MantisBT Team |