lmi
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [lmi] Fwd: How did this unit test fail?


From: Greg Chicares
Subject: Re: [lmi] Fwd: How did this unit test fail?
Date: Wed, 21 Mar 2018 13:31:14 +0000
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.6.0

[...I never got a copy at my ISP address...]
> ---------- Forwarded message ----------
> From: Vadim Zeitlin <address@hidden>
> Date: Mon, Mar 19, 2018 at 11:05 PM
> Subject: Re: [lmi] How did this unit test fail?
> To: "Let me illustrate..." <address@hidden>
> 
> On Mon, 19 Mar 2018 21:13:08 +0000 Greg Chicares <address@hidden>
> wrote:
> 
> GC> When I tested my last set of commits carefully before pushing, I was
> GC> really surprised to see that 'bourn_cast_test' failed (without the
> GC> change that I sneaked into 'bourn_cast_test.cpp' in commit 3d3e2b6).
> 
>  Unfortunately I don't see this failure, neither under Linux x86_64 (which
> wasn't really surprising) nor under MSW, using the official makefiles.
> 
> GC> Reverting those changes to that file only, which amount only to this:
> GC>
> GC> -    stifle_warning_for_unused_variable(z);
> GC> +    (void)&z;
> GC>
> GC> in two places, reproduces the error, which is:
> GC>
> GC> ???? test failed:
> GC> ???? test failed: 0
> GC> [invoked from file /opt/lmi/src/lmi/bourn_cast_test.cpp, line: 781]
> GC> [file /opt/lmi/src/lmi/bourn_cast_test.cpp, line 261]

At the bottom I'll paste a session where I've repeated exactly the
same commands you used, with 'make clobber' first to purge my entire
build directory.

>  I did, using the latest master, i.e. 3d3e2b67916c72c7446f140f2f9864
> 56b1164b1e
> 
>         git checkout 3d3e2b6~ -- bourn_cast_test.cpp

I had expected that to give me a detached HEAD, but it didn't
(see the result of 'git status' below).

Suppose I wanted to undo that portion of that commit, and then
commit it to 'master'. Would it be safe to run the command you
gave above, then 'git commit bourn_cast_test.cpp'? Or do I need
to do something like 'git checkout master' first, and then
apply that change in a more manual way?

> followed by
> 
>         make bourn_cast_test.exe
>         make bourn_cast_test.exe-run

I still reproduce the error.

> (BTW, wouldn't it make sense for "%-run" to depend on "%"?)

I would normally do this instead:
  make $coefficiency unit_tests unit_test_targets=regex_test.exe 2>&1 |less -S

>  Do I need to do anything special when building or running the test to see
> the problem?

No, I reproduced the error using the same exact commands you used.

> GC> Vadim--I can't guess what went wrong here. Can you see it?
> 
>  No, unfortunately I don't. As always, I'd recommend cleaning everything
> and rebuilding once again

Yes, and the session log below shows everything being rebuilt.

>, and if the problem still persists after doing
> this, we'd need to compare the binaries produced in your and my builds and
> maybe try running your binary here and vice versa to ascertain whether the
> problem is in the binary itself or in the environment (I'd really like to
> blame Wine, but I don't see how could it be its fault...).

I'm wondering the problem could be that debian's MinGW-w64 package
is missing some upstream fix. I'm using the latest:

# apt-get -s install g++-mingw-w64
Reading package lists... Done
Building dependency tree       
Reading state information... Done
g++-mingw-w64 is already the newest version (7.2.0-20+20.2).
0 upgraded, 0 newly installed, 0 to remove and 3 not upgraded.

And, BTW, last night I upgraded the host (apt-get upgrade and
dist-upgrade) and rebooted, and this morning I also upgraded
the chroot similarly, so both host and chroot now show:
  0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.

>  Please let me know if you'd like me to send you my binary for testing,

Yes, please, and I'll send you mine.

Here's my session log:

/opt/lmi/src/lmi[0]$make clobber
rm --force --recursive /opt/lmi/src/lmi/../build
/opt/lmi/src/lmi[0]$git checkout 3d3e2b6~ -- bourn_cast_test.cpp
/opt/lmi/src/lmi[0]$git status
On branch master
Your branch is ahead of 'origin/master' by 1 commit.
  (use "git push" to publish your local commits)

Changes to be committed:
  (use "git reset HEAD <file>..." to unstage)

        modified:   bourn_cast_test.cpp

/opt/lmi/src/lmi[0]$make bourn_cast_test.exe
i686-w64-mingw32-g++ -MMD -MP -MT alert.o -MF alert.d  -c -I /opt/lmi/src/lmi 
-I /opt/lmi/src/lmi/tools/pete-2.1.1 -I 
/opt/lmi/local/lib/wx/include/i686-w64-mingw32-msw-unicode-3.1 -I 
/opt/lmi/local/include/wx-3.1 -I /opt/lmi/third_party/include -I 
/opt/lmi/third_party/src -I /opt/lmi/local/include -I 
/opt/lmi/local/include/libxml2 -DLMI_WX_NEW_USE_SO  -DLIBXML_USE_DLL -DSTRICT   
 -D_FILE_OFFSET_BITS=64 -DWXUSINGDLL -D__WXMSW__ -DBOOST_NO_AUTO_PTR 
-DBOOST_STRICT_CONFIG -DBOOST_STATIC_ASSERT_HPP   -std=c++17 -frounding-math 
-pedantic-errors -Werror -Wall -Wcast-align -Wconversion 
-Wdeprecated-declarations -Wdisabled-optimization -Wextra -Wimport -Wmultichar 
-Wpacked -Wpointer-arith -Wredundant-decls -Wshadow -Wsign-compare -Wundef 
-Wunreachable-code -Wwrite-strings  -Wctor-dtor-privacy -Wdeprecated 
-Wnon-template-friend -Woverloaded-virtual -Wpmf-conversions -Wsynth  
-Wcast-qual  -Wno-conversion -Wno-parentheses   
-D'BOOST_STATIC_ASSERT(A)=static_assert((A))'   -ggdb -O2 
-fno-omit-frame-pointer    /opt/lmi/src/lmi/alert.cpp -oalert.o
i686-w64-mingw32-g++ -MMD -MP -MT alert_cli.o -MF alert_cli.d  -c -I 
/opt/lmi/src/lmi -I /opt/lmi/src/lmi/tools/pete-2.1.1 -I 
/opt/lmi/local/lib/wx/include/i686-w64-mingw32-msw-unicode-3.1 -I 
/opt/lmi/local/include/wx-3.1 -I /opt/lmi/third_party/include -I 
/opt/lmi/third_party/src -I /opt/lmi/local/include -I 
/opt/lmi/local/include/libxml2 -DLMI_WX_NEW_USE_SO  -DLIBXML_USE_DLL -DSTRICT   
 -D_FILE_OFFSET_BITS=64 -DWXUSINGDLL -D__WXMSW__ -DBOOST_NO_AUTO_PTR 
-DBOOST_STRICT_CONFIG -DBOOST_STATIC_ASSERT_HPP   -std=c++17 -frounding-math 
-pedantic-errors -Werror -Wall -Wcast-align -Wconversion 
-Wdeprecated-declarations -Wdisabled-optimization -Wextra -Wimport -Wmultichar 
-Wpacked -Wpointer-arith -Wredundant-decls -Wshadow -Wsign-compare -Wundef 
-Wunreachable-code -Wwrite-strings  -Wctor-dtor-privacy -Wdeprecated 
-Wnon-template-friend -Woverloaded-virtual -Wpmf-conversions -Wsynth  
-Wcast-qual  -Wno-conversion -Wno-parentheses   
-D'BOOST_STATIC_ASSERT(A)=static_assert((A))'   -ggdb -O2 
-fno-omit-frame-pointer    /opt/lmi/src/lmi/alert_cli.cpp -oalert_cli.o
i686-w64-mingw32-g++ -MMD -MP -MT fenv_lmi.o -MF fenv_lmi.d  -c -I 
/opt/lmi/src/lmi -I /opt/lmi/src/lmi/tools/pete-2.1.1 -I 
/opt/lmi/local/lib/wx/include/i686-w64-mingw32-msw-unicode-3.1 -I 
/opt/lmi/local/include/wx-3.1 -I /opt/lmi/third_party/include -I 
/opt/lmi/third_party/src -I /opt/lmi/local/include -I 
/opt/lmi/local/include/libxml2 -DLMI_WX_NEW_USE_SO  -DLIBXML_USE_DLL -DSTRICT   
 -D_FILE_OFFSET_BITS=64 -DWXUSINGDLL -D__WXMSW__ -DBOOST_NO_AUTO_PTR 
-DBOOST_STRICT_CONFIG -DBOOST_STATIC_ASSERT_HPP   -std=c++17 -frounding-math 
-pedantic-errors -Werror -Wall -Wcast-align -Wconversion 
-Wdeprecated-declarations -Wdisabled-optimization -Wextra -Wimport -Wmultichar 
-Wpacked -Wpointer-arith -Wredundant-decls -Wshadow -Wsign-compare -Wundef 
-Wunreachable-code -Wwrite-strings  -Wctor-dtor-privacy -Wdeprecated 
-Wnon-template-friend -Woverloaded-virtual -Wpmf-conversions -Wsynth  
-Wcast-qual  -Wno-conversion -Wno-parentheses   
-D'BOOST_STATIC_ASSERT(A)=static_assert((A))'   -ggdb -O2 
-fno-omit-frame-pointer    /opt/lmi/src/lmi/fenv_lmi.cpp -ofenv_lmi.o
i686-w64-mingw32-g++ -MMD -MP -MT getopt.o -MF getopt.d  -c -I /opt/lmi/src/lmi 
-I /opt/lmi/src/lmi/tools/pete-2.1.1 -I 
/opt/lmi/local/lib/wx/include/i686-w64-mingw32-msw-unicode-3.1 -I 
/opt/lmi/local/include/wx-3.1 -I /opt/lmi/third_party/include -I 
/opt/lmi/third_party/src -I /opt/lmi/local/include -I 
/opt/lmi/local/include/libxml2 -DLMI_WX_NEW_USE_SO  -DLIBXML_USE_DLL -DSTRICT   
 -D_FILE_OFFSET_BITS=64 -DWXUSINGDLL -D__WXMSW__ -DBOOST_NO_AUTO_PTR 
-DBOOST_STRICT_CONFIG -DBOOST_STATIC_ASSERT_HPP   -std=c++17 -frounding-math 
-pedantic-errors -Werror -Wall -Wcast-align -Wconversion 
-Wdeprecated-declarations -Wdisabled-optimization -Wextra -Wimport -Wmultichar 
-Wpacked -Wpointer-arith -Wredundant-decls -Wshadow -Wsign-compare -Wundef 
-Wunreachable-code -Wwrite-strings  -Wctor-dtor-privacy -Wdeprecated 
-Wnon-template-friend -Woverloaded-virtual -Wpmf-conversions -Wsynth  
-Wcast-qual  -Wno-conversion -Wno-parentheses   
-D'BOOST_STATIC_ASSERT(A)=static_assert((A))'   -ggdb -O2 
-fno-omit-frame-pointer    /opt/lmi/src/lmi/getopt.cpp -ogetopt.o
i686-w64-mingw32-g++ -MMD -MP -MT license.o -MF license.d  -c -I 
/opt/lmi/src/lmi -I /opt/lmi/src/lmi/tools/pete-2.1.1 -I 
/opt/lmi/local/lib/wx/include/i686-w64-mingw32-msw-unicode-3.1 -I 
/opt/lmi/local/include/wx-3.1 -I /opt/lmi/third_party/include -I 
/opt/lmi/third_party/src -I /opt/lmi/local/include -I 
/opt/lmi/local/include/libxml2 -DLMI_WX_NEW_USE_SO  -DLIBXML_USE_DLL -DSTRICT   
 -D_FILE_OFFSET_BITS=64 -DWXUSINGDLL -D__WXMSW__ -DBOOST_NO_AUTO_PTR 
-DBOOST_STRICT_CONFIG -DBOOST_STATIC_ASSERT_HPP   -std=c++17 -frounding-math 
-pedantic-errors -Werror -Wall -Wcast-align -Wconversion 
-Wdeprecated-declarations -Wdisabled-optimization -Wextra -Wimport -Wmultichar 
-Wpacked -Wpointer-arith -Wredundant-decls -Wshadow -Wsign-compare -Wundef 
-Wunreachable-code -Wwrite-strings  -Wctor-dtor-privacy -Wdeprecated 
-Wnon-template-friend -Woverloaded-virtual -Wpmf-conversions -Wsynth  
-Wcast-qual  -Wno-conversion -Wno-parentheses   
-D'BOOST_STATIC_ASSERT(A)=static_assert((A))'   -ggdb -O2 
-fno-omit-frame-pointer    /opt/lmi/src/lmi/license.cpp -olicense.o
i686-w64-mingw32-g++ -MMD -MP -MT bourn_cast_test.o -MF bourn_cast_test.d  -c 
-I /opt/lmi/src/lmi -I /opt/lmi/src/lmi/tools/pete-2.1.1 -I 
/opt/lmi/local/lib/wx/include/i686-w64-mingw32-msw-unicode-3.1 -I 
/opt/lmi/local/include/wx-3.1 -I /opt/lmi/third_party/include -I 
/opt/lmi/third_party/src -I /opt/lmi/local/include -I 
/opt/lmi/local/include/libxml2 -DLMI_WX_NEW_USE_SO  -DLIBXML_USE_DLL -DSTRICT   
 -D_FILE_OFFSET_BITS=64 -DWXUSINGDLL -D__WXMSW__ -DBOOST_NO_AUTO_PTR 
-DBOOST_STRICT_CONFIG -DBOOST_STATIC_ASSERT_HPP   -std=c++17 -frounding-math 
-pedantic-errors -Werror -Wall -Wcast-align -Wconversion 
-Wdeprecated-declarations -Wdisabled-optimization -Wextra -Wimport -Wmultichar 
-Wpacked -Wpointer-arith -Wredundant-decls -Wshadow -Wsign-compare -Wundef 
-Wunreachable-code -Wwrite-strings  -Wctor-dtor-privacy -Wdeprecated 
-Wnon-template-friend -Woverloaded-virtual -Wpmf-conversions -Wsynth  
-Wcast-qual  -Wno-conversion -Wno-parentheses   
-D'BOOST_STATIC_ASSERT(A)=static_assert((A))'   -ggdb -O2 
-fno-omit-frame-pointer    /opt/lmi/src/lmi/bourn_cast_test.cpp 
-obourn_cast_test.o
i686-w64-mingw32-g++ -MMD -MP -MT timer.o -MF timer.d  -c -I /opt/lmi/src/lmi 
-I /opt/lmi/src/lmi/tools/pete-2.1.1 -I 
/opt/lmi/local/lib/wx/include/i686-w64-mingw32-msw-unicode-3.1 -I 
/opt/lmi/local/include/wx-3.1 -I /opt/lmi/third_party/include -I 
/opt/lmi/third_party/src -I /opt/lmi/local/include -I 
/opt/lmi/local/include/libxml2 -DLMI_WX_NEW_USE_SO  -DLIBXML_USE_DLL -DSTRICT   
 -D_FILE_OFFSET_BITS=64 -DWXUSINGDLL -D__WXMSW__ -DBOOST_NO_AUTO_PTR 
-DBOOST_STRICT_CONFIG -DBOOST_STATIC_ASSERT_HPP   -std=c++17 -frounding-math 
-pedantic-errors -Werror -Wall -Wcast-align -Wconversion 
-Wdeprecated-declarations -Wdisabled-optimization -Wextra -Wimport -Wmultichar 
-Wpacked -Wpointer-arith -Wredundant-decls -Wshadow -Wsign-compare -Wundef 
-Wunreachable-code -Wwrite-strings  -Wctor-dtor-privacy -Wdeprecated 
-Wnon-template-friend -Woverloaded-virtual -Wpmf-conversions -Wsynth  
-Wcast-qual  -Wno-conversion -Wno-parentheses   
-D'BOOST_STATIC_ASSERT(A)=static_assert((A))'   -ggdb -O2 
-fno-omit-frame-pointer    /opt/lmi/src/lmi/timer.cpp -otimer.o
i686-w64-mingw32-g++ -o bourn_cast_test.exe alert.o alert_cli.o fenv_lmi.o 
getopt.o license.o bourn_cast_test.o timer.o -L . -L /opt/lmi/local/lib -L 
/opt/lmi/local/bin    -lexslt -lxslt -lxml2      
-Wl,-Map,bourn_cast_test.exe.map 
/opt/lmi/src/lmi[0]$make bourn_cast_test.exe-run

Running bourn_cast_test:

???? test failed: 
???? test failed: 0
[invoked from file /opt/lmi/src/lmi/bourn_cast_test.cpp, line: 781]
[file /opt/lmi/src/lmi/bourn_cast_test.cpp, line 261]

  Speed tests (Double, Float, Signed, Unsigned):

  static_cast<U>(S): 5.024e-004 s mean;        456 us least of 100 runs
   bourn_cast<U>(S): 4.382e-004 s mean;        418 us least of 100 runs
   bourn_cast<S>(U): 4.229e-004 s mean;        418 us least of 100 runs

  static_cast<D>(U): 8.369e-004 s mean;        836 us least of 100 runs
   bourn_cast<D>(U): 2.508e-003 s mean;       2506 us least of 100 runs

  static_cast<U>(D): 2.922e-003 s mean;       2589 us least of 100 runs
   bourn_cast<U>(D): 1.271e-002 s mean;      12219 us least of  79 runs
   bourn_cast<S>(D): 6.410e-003 s mean;       6065 us least of 100 runs

  static_cast<F>(D): 1.317e-003 s mean;       1253 us least of 100 runs
   bourn_cast<F>(D): 3.249e-003 s mean;       3204 us least of 100 runs
   bourn_cast<D>(F): 3.580e-003 s mean;       3445 us least of 100 runs

???? 1 test errors detected; 598 tests succeeded


???? returning with error code 201

???? 
???? errors detected; see stdout for details
/opt/lmi/src/lmi/workhorse.make:1179: recipe for target 
'bourn_cast_test.exe-run' failed
make[1]: [bourn_cast_test.exe-run] Error 201 (ignored)
/opt/lmi/src/lmi[0]$i686-w64-mingw32-g++ -dumpversion
7.2-win32

reply via email to

[Prev in Thread] Current Thread [Next in Thread]