stdcxx-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Travis Vitek" <Travis.Vi...@roguewave.com>
Subject RE: svn commit: r646002 - /stdcxx/trunk/util/output.cpp
Date Tue, 08 Apr 2008 20:28:07 GMT
 

>Eric Lemings wrote:
> 
>Does this mean we have no solution for resolving this issue (i.e.
>back to Square One as it were)?  It's currently classified as one
>of two Critical issues for 4.2.1 and Andrew's last comment is
>"Further work is necessary".  Question is, how much work?
>
>Thanks,
>Brad.
>

I don't know. I'm having a hard time seeing why we were getting the DIFF
errors with the examples in the nightly builds. I know for a fact that I
tested the test, examples and locales multiple times before I committed
my last 'fix', and I've just rebuilt using the code from yesterday and I
have no problems today either...

C:\Build\stdcxx\trunk\msvc-8.0\11s\examples>..\bin\exec.exe -d
c:\build\stdcxx\trunk\examples @aa
NAME                                     STATUS WARN ASSERTS FAILED
PERCNT    USER     SYS    REAL
accumulate.exe                                0    0
0.015   0.000   0.203
adj_diff.exe                                  0    0
0.015   0.000   0.187
advance.exe                                   0    0
0.015   0.000   0.281
alg1.exe                                      0    0
0.015   0.000   0.124
alg2.exe                                      0    0
0.015   0.000   0.109
alg3.exe                                      0    0
0.015   0.015   0.249
alg4.exe                                      0    0
0.015   0.000   0.234
alg5.exe                                      0    0
0.015   0.000   0.234
alg6.exe                                      0    0
0.015   0.000   0.140
alg7.exe                                      0    0
0.015   0.000   0.124
<snip>


I'm certain that this boils down to check_test() and check_compat_test()
functions needing the provided file to be opened in binary mode and the
check_example() function needing it to be text mode. I'm uncertain why
binary mode doesn't work in the nightly builds, but works fine locally,
but it appears that we previously used text mode for comparing the
example output. If the problem is that simple, then I the parse_output()
function could have been augmented to workaround the problem.

+    const bool is_not_an_example =
+        0 == options->data_dir || '\0' == *options->data_dir;
+
+    const char* file_mode = "r";
+    if (iis_not_an_example)
+        file_mode = "rb";
+
+    data = fopen (out_name, file_mode);
-    data = fopen (out_name, "rb");

     if (0 == data) {
         if (ENOENT != errno)
             warn ("Error opening %s: %s\n", out_name, strerror
(errno));
         status->status = ST_NO_OUTPUT;
     }
     else {
+        if (is_not_an_example) {
-        if (0 == options->data_dir || '\0' == *options->data_dir) {

This opens the file in binary mode for the tests and locales, and in
text mode for the examples.

Travis

Mime
View raw message