[tor-bugs] #18841 [Core Tor/Tor]: Test test_bt.sh fails

Tor Bug Tracker & Wiki blackhole at torproject.org
Thu May 5 16:38:02 UTC 2016


#18841: Test test_bt.sh fails
--------------------------+------------------------------------
 Reporter:  trudokal      |          Owner:
     Type:  defect        |         Status:  new
 Priority:  Medium        |      Milestone:  Tor: 0.2.8.x-final
Component:  Core Tor/Tor  |        Version:  Tor: 0.2.8.2-alpha
 Severity:  Normal        |     Resolution:
 Keywords:  test          |  Actual Points:
Parent ID:                |         Points:
 Reviewer:                |        Sponsor:
--------------------------+------------------------------------
Changes (by trudokal):

 * status:  needs_information => new


Comment:

 Replying to [comment:2 nickm]:
 > Hm, what kind of linux are you on?  This works for me, and I can't
 reproduce the failure.
 >
 > (Then again, I have gcc 5.3.1.  I wonder if the gcc is at fault?)
 >
 > Did earlier versions of Tor (containing test_bt.sh) also fail?


 Did some test test_bt.sh seems to have been introduced for tor-0.2.7.3-rc.
 I checked versions

 tor-0.2.7.3-rc
 tor-0.2.7.4-rc
 tor-0.2.7.6
 tor-0.2.8.2-alpha

 After getting a little more used to the output, I realise that the output
 is actually no error but intended.
 What lets the test fail is that the stacktrace does not contain the
 'function names', e.g. output for 'test-bt-cl crash' is

 {{{
 src/test/test-bt-cl(+0x15e3f)[0x7f298f879e3f]
 src/test/test-bt-cl(crash+0x50)[0x7f298f879a10]
 src/test/test-bt-cl(crash+0x50)[0x7f298f879a10]
 src/test/test-bt-cl(oh_what+0x25)[0x7f298f879a85]
 src/test/test-bt-cl(a_tangled_web+0x25)[0x7f298f879ae5]
 src/test/test-bt-cl(we_weave+0x25)[0x7f298f879b55]
 src/test/test-bt-cl(main+0xe9)[0x7f298f879389]
 /lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xf5)[0x7f298eb95b45]
 src/test/test-bt-cl(+0x15882)[0x7f298f879882]
 }}}

 and not

 {{{
 src/test/test-bt-cl(+0x15e3f)[0x7f298f879e3f]
 src/test/test-bt-cl(+0x50)[0x7f298f879a10]
 src/test/test-bt-cl(+0x50)[0x7f298f879a10]
 src/test/test-bt-cl(+0x25)[0x7f298f879a85]
 src/test/test-bt-cl(+0x25)[0x7f298f879ae5]
 src/test/test-bt-cl(+0x25)[0x7f298f879b55]
 src/test/test-bt-cl(+0xe9)[0x7f298f879389]
 /lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xf5)[0x7f298eb95b45]
 src/test/test-bt-cl(+0x15882)[0x7f298f879882]
 }}}

 (note the missing names.)

 I'm not a C/C++ programmer. But googleing reveals that passing '-rdynamic'
 to gcc produces those names in the stacktrace.
 Indeed:

 {{{
 export CFLAGS="-rdynamic -g -O2"
 ./configure
 make
 make verify
 [...]
 PASS: src/test/test
 PASS: src/test/test-slow
 PASS: src/test/test-memwipe
 PASS: src/test/test_workqueue
 PASS: src/test/test_keygen.sh
 PASS: src/test/test_zero_length_keys.sh
 SKIP: src/test/test_switch_id.sh
 PASS: src/test/test_ntor.sh
 PASS: src/test/test_bt.sh
 ============================================================================
 Testsuite summary for tor 0.2.9.0-alpha-dev
 ============================================================================
 # TOTAL: 9
 # PASS:  8
 # SKIP:  1
 # XFAIL: 0
 # FAIL:  0
 # XPASS: 0
 # ERROR: 0
 ===========================================================================
 }}}

 Note: Above output is for the master branch, but I also tested
 tor-0.2.8.2-alpha
 tor-0.2.7.6
 and they succeed as well.

 ----

 = Possible solution =
 Since the test depend on '-rdynamic' being set and this does not seem to
 be
 enabled by all distributions. It should be enabled for the test.
 But instead of enabling for the whole build (a distro might have a good
 reason
 for disabling it, I don't know), only enable it in the linking phase of
 test-bt-ct.

 I'm not an expert in autotools/make, but getting a '-rdynamic' in the
 target
 for test-bt-cl in Makefile.in seems to do it. Sadly, I have no clue how to
 get
 it there, because the target is auto-generated by autogen.sh.

--
Ticket URL: <https://trac.torproject.org/projects/tor/ticket/18841#comment:4>
Tor Bug Tracker & Wiki <https://trac.torproject.org/>
The Tor Project: anonymity online


More information about the tor-bugs mailing list