
On 05/31/09 07:39, vicente.botet wrote: [snip]
As I said in another post, the patch is not correct. So please do not apply it.
I must have overlooked that post ;(
The test case is not currently neither good because the test succeeds even if mycallable2() is not called . In order to test this the operator()() should contains an abort when the called.
struct mycallable2 { void operator()() const { mycallable2_called=true; std::cout << "mycallable2" << std::endl; ***** abort() }; };
And the Jamfile should the contain
rule thread-run-fail ( sources ) { return [ run-fail $(sources) ../build//boost_thread ] [ run-fail $(sources) ../src/tss_null.cpp ../build//boost_thread/<link>static : : : : $(sources[1]:B)_lib ] ; }
test-suite "threads" : [ thread-run-fail test_ticket_2739.cpp ] ;
Whithout these modification you can inspect the .output file on the bin.v2 directory and see if the trace "mycallable2" appears. Could you run the test case without applying the patch and send the output?
OK, I tried it by first rm'ing th patched thread.cpp, then doing svn update for whole trunk. Then did bjam in test_patches. This is all shown in attachment. Welcome to the Emacs shell ~/prog_dev/boost-svn/ro/boost-trunk/libs/thread/test_patches $ cd ../../.. ~/prog_dev/boost-svn/ro/boost-trunk $ svn update At revision 53500. ~/prog_dev/boost-svn/ro/boost-trunk $ cd libs/thread/test/ ~/prog_dev/boost-svn/ro/boost-trunk/libs/thread/test $ rcsdiff Jamfile.v2 rcsdiff: RCS/Jamfile.v2,v: No such file or directory ~/prog_dev/boost-svn/ro/boost-trunk/libs/thread/test $ cd ../test_patches/ ~/prog_dev/boost-svn/ro/boost-trunk/libs/thread/test_patches $ rcsdiff Jamfile.v2 =================================================================== RCS file: RCS/Jamfile.v2,v retrieving revision 1.2 diff -r1.2 Jamfile.v2 26c26 < rule thread-run ( sources ) ---
rule thread-run-fail ( sources ) 29,30c29,30 < [ run $(sources) ../build//boost_thread ] < [ run $(sources) ../src/tss_null.cpp ../build//boost_thread/<link>static
[ run-fail $(sources) ../build//boost_thread ] [ run-fail $(sources) ../src/tss_null.cpp ../build//boost_thread/<link>static
37c37 < : [ thread-run test_ticket_2739.cpp ] ---
: [ thread-run-fail test_ticket_2739.cpp ]
~/prog_dev/boost-svn/ro/boost-trunk/libs/thread/test_patches $ rcsdiff test_ticket_2739.cpp =================================================================== RCS file: RCS/test_ticket_2739.cpp,v retrieving revision 1.1 diff -r1.1 test_ticket_2739.cpp 26c26 < //BOOST_CHECK(false && "mycallable2 has been called"); ---
abort();
~/prog_dev/boost-svn/ro/boost-trunk/libs/thread/test_patches $ bjam sh: icpc: not found docutils-dir= tools-dir= /usr/bin/rst2html.py ...patience... ...found 1064 targets... ...updating 10 targets... gcc.compile.c++ ../../../bin.v2/libs/thread/test_patches/test_ticket_2739.test/gcc-4.2/debug/threading-multi/test_ticket_2739.o gcc.link ../../../bin.v2/libs/thread/test_patches/test_ticket_2739.test/gcc-4.2/debug/threading-multi/test_ticket_2739 testing.capture-output ../../../bin.v2/libs/thread/test_patches/test_ticket_2739.test/gcc-4.2/debug/threading-multi/test_ticket_2739.run LD_LIBRARY_PATH=/home/evansl/prog_dev/boost-svn/ro/boost-trunk/bin.v2/libs/thread/build/gcc-4.2/debug/threading-multi:/usr/bin:/usr/lib:/usr/lib32:/usr/lib64:$LD_LIBRARY_PATH export LD_LIBRARY_PATH "../../../bin.v2/libs/thread/test_patches/test_ticket_2739.test/gcc-4.2/debug/threading-multi/test_ticket_2739" > "../../../bin.v2/libs/thread/test_patches/test_ticket_2739.test/gcc-4.2/debug/threading-multi/test_ticket_2739.output" 2>&1 status=$? echo >> "../../../bin.v2/libs/thread/test_patches/test_ticket_2739.test/gcc-4.2/debug/threading-multi/test_ticket_2739.output" echo EXIT STATUS: $status >> "../../../bin.v2/libs/thread/test_patches/test_ticket_2739.test/gcc-4.2/debug/threading-multi/test_ticket_2739.output" if test $status -eq 0 ; then cp "../../../bin.v2/libs/thread/test_patches/test_ticket_2739.test/gcc-4.2/debug/threading-multi/test_ticket_2739.output" "../../../bin.v2/libs/thread/test_patches/test_ticket_2739.test/gcc-4.2/debug/threading-multi/test_ticket_2739.run" fi verbose=0 if test $status -ne 0 ; then verbose=1 fi if test $verbose -eq 1 ; then echo ====== BEGIN OUTPUT ====== cat "../../../bin.v2/libs/thread/test_patches/test_ticket_2739.test/gcc-4.2/debug/threading-multi/test_ticket_2739.output" echo ====== END OUTPUT ====== fi exit $status ..failed testing.capture-output ../../../bin.v2/libs/thread/test_patches/test_ticket_2739.test/gcc-4.2/debug/threading-multi/test_ticket_2739.run... ...removing ../../../bin.v2/libs/thread/test_patches/test_ticket_2739.test/gcc-4.2/debug/threading-multi/test_ticket_2739.run gcc.compile.c++ ../../../bin.v2/libs/thread/test_patches/test_ticket_2739_lib.test/gcc-4.2/debug/threading-multi/test_ticket_2739.o gcc.link ../../../bin.v2/libs/thread/test_patches/test_ticket_2739_lib.test/gcc-4.2/debug/threading-multi/test_ticket_2739_lib testing.capture-output ../../../bin.v2/libs/thread/test_patches/test_ticket_2739_lib.test/gcc-4.2/debug/threading-multi/test_ticket_2739_lib.run LD_LIBRARY_PATH=/usr/bin:/usr/lib:/usr/lib32:/usr/lib64:$LD_LIBRARY_PATH export LD_LIBRARY_PATH "../../../bin.v2/libs/thread/test_patches/test_ticket_2739_lib.test/gcc-4.2/debug/threading-multi/test_ticket_2739_lib" > "../../../bin.v2/libs/thread/test_patches/test_ticket_2739_lib.test/gcc-4.2/debug/threading-multi/test_ticket_2739_lib.output" 2>&1 status=$? echo >> "../../../bin.v2/libs/thread/test_patches/test_ticket_2739_lib.test/gcc-4.2/debug/threading-multi/test_ticket_2739_lib.output" echo EXIT STATUS: $status >> "../../../bin.v2/libs/thread/test_patches/test_ticket_2739_lib.test/gcc-4.2/debug/threading-multi/test_ticket_2739_lib.output" if test $status -eq 0 ; then cp "../../../bin.v2/libs/thread/test_patches/test_ticket_2739_lib.test/gcc-4.2/debug/threading-multi/test_ticket_2739_lib.output" "../../../bin.v2/libs/thread/test_patches/test_ticket_2739_lib.test/gcc-4.2/debug/threading-multi/test_ticket_2739_lib.run" fi verbose=0 if test $status -ne 0 ; then verbose=1 fi if test $verbose -eq 1 ; then echo ====== BEGIN OUTPUT ====== cat "../../../bin.v2/libs/thread/test_patches/test_ticket_2739_lib.test/gcc-4.2/debug/threading-multi/test_ticket_2739_lib.output" echo ====== END OUTPUT ====== fi exit $status ..failed testing.capture-output ../../../bin.v2/libs/thread/test_patches/test_ticket_2739_lib.test/gcc-4.2/debug/threading-multi/test_ticket_2739_lib.run... ...removing ../../../bin.v2/libs/thread/test_patches/test_ticket_2739_lib.test/gcc-4.2/debug/threading-multi/test_ticket_2739_lib.run ...failed updating 2 targets... ...skipped 4 targets... ...updated 4 targets... ~/prog_dev/boost-svn/ro/boost-trunk/libs/thread/test_patches $ cat ../../../bin.v2/libs/thread/test_patches/test_ticket_2739_lib.test/gcc-4.2/debug/threading-multi/test_ticket_2739_lib.output Running 1 test case... mycallable1 *** No errors detected EXIT STATUS: 0 ~/prog_dev/boost-svn/ro/boost-trunk/libs/thread/test_patches $