View Issue Details [ Jump to Notes ] | [ Print ] | ||||||||
ID | Project | Category | View Status | Date Submitted | Last Update | ||||
0010656 | CMake | CTest | public | 2010-05-02 05:28 | 2011-01-12 07:27 | ||||
Reporter | XU Liang | ||||||||
Assigned To | Brad King | ||||||||
Priority | normal | Severity | major | Reproducibility | always | ||||
Status | closed | Resolution | fixed | ||||||
Platform | OS | OS Version | |||||||
Product Version | CMake-2-8 | ||||||||
Target Version | CMake 2.8.4 | Fixed in Version | CMake 2.8.4 | ||||||
Summary | 0010656: The utf-8 output of failed test was cut wrongly at 'Measurement' element of Test.xml | ||||||||
Description | My program write UTF-8 Chinese output. I can get right content at 'Testing/Temporary/LastTest_20100502-0448.log'. But the content of 'Testing/20100502-0448/Test.xml' was cut wrongly. I know CustomMaximumFailedTestOutputSize is 300k, but I got the content length of Measurement is 2.2k. After add 'CTEST_FULL_OUTPUT' string at my output, I got right content at 'Test.xml'. So I think the root cause is the 'cmCTestTestHandler::CleanTestOutput' can't process UTF-8 string rightly. In attachment you can find failed test at Test.xml:255 and LastTest_20100502-0448.log:1471. | ||||||||
Tags | No tags attached. | ||||||||
Attached Files | ![]() | ||||||||
Relationships | ||||||
|
Relationships |
Notes | |
(0020508) XU Liang (reporter) 2010-05-02 05:56 edited on: 2010-05-02 05:57 |
After add some debug log at ctest, I found there is root-cause at cmCTestTestHandler.cxx:1996. The UTF-8 string that contains non-ascii char has signed-bit, so it always break. 1975 bool cmCTestTestHandler::CleanTestOutput(std::string& output, 1976 size_t remove_threshold) ... 1993 int ch = output[cc]; 1994 if ( ch < 0 || ch > 255 ) 1995 { 1996 break; 1997 } |
(0022716) trsystran (reporter) 2010-10-27 12:02 |
This is a blocking issue: all xml tests outputs containing utf8 are cut when encountering the first non-ascii char that has signed-bit. |
(0023688) XU Liang (reporter) 2010-12-03 01:36 |
trsystran: You can just comment the line 1994 ~ 1997 of cmCTestTestHandler.cxx before you build the CMAKE 2.8.3. |
(0024375) David Cole (manager) 2011-01-03 18:32 |
Brad: if you have time to take a look, great... If not, just assign back to me. Thanks. |
(0024390) Brad King (manager) 2011-01-04 09:33 |
This commit: http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=e4beefeb [^] addressed encoding of data in *.xml files like Test.xml, but I didn't know about this separate processing loop that occurs before even getting to that point. Any loop over test output needs to perform utf-8 decoding. |
(0024400) Brad King (manager) 2011-01-04 13:32 |
Fixed: http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=e73bf1c3 [^] |
Notes |
Issue History | |||
Date Modified | Username | Field | Change |
2010-05-02 05:28 | XU Liang | New Issue | |
2010-05-02 05:28 | XU Liang | File Added: Testing.7z | |
2010-05-02 05:56 | XU Liang | Note Added: 0020508 | |
2010-05-02 05:57 | XU Liang | Note Edited: 0020508 | |
2010-10-27 12:02 | trsystran | Note Added: 0022716 | |
2010-12-03 01:36 | XU Liang | Note Added: 0023688 | |
2010-12-14 16:39 | David Cole | Relationship added | related to 0009944 |
2010-12-14 16:41 | David Cole | Assigned To | => David Cole |
2010-12-14 16:41 | David Cole | Status | new => assigned |
2010-12-17 07:41 | David Cole | Target Version | => CMake 2.8.4 |
2011-01-03 18:32 | David Cole | Assigned To | David Cole => Brad King |
2011-01-03 18:32 | David Cole | Note Added: 0024375 | |
2011-01-04 09:33 | Brad King | Note Added: 0024390 | |
2011-01-04 13:32 | Brad King | Note Added: 0024400 | |
2011-01-04 13:32 | Brad King | Status | assigned => closed |
2011-01-04 13:32 | Brad King | Resolution | open => fixed |
2011-01-12 07:27 | David Cole | Fixed in Version | => CMake 2.8.4 |
Issue History |
Copyright © 2000 - 2018 MantisBT Team |