[tor-bugs] #2051 [Tor Client]: Unit tests test_util_spawn_background_* fail when run from make distcheck

Tor Bug Tracker & Wiki torproject-admin at torproject.org
Mon Oct 11 22:40:38 UTC 2010


#2051: Unit tests test_util_spawn_background_* fail when run from make distcheck
------------------------+---------------------------------------------------
 Reporter:  sjmurdoch   |       Owner:              
     Type:  defect      |      Status:  needs_review
 Priority:  normal      |   Milestone:              
Component:  Tor Client  |     Version:              
 Keywords:              |      Parent:              
------------------------+---------------------------------------------------

Old description:

> Currently the unit tests test_util_spawn_background_* assume that they
> are run from the Tor build directory (so as to find test-child). This is
> not the case when running make distcheck, so the test will fail. The path
> to test-child can be found through dirname(argv![0])/../test-child, but
> unit tests don't have access to argv![0]. Therefore one solution is to
> use autoconf to find the Tor build directory and base the path on this.

New description:

 Currently the unit tests `test_util_spawn_background_`* assume that they
 are run from the Tor build directory (so as to find `test-child`). This is
 not the case when running `make distcheck`, so the test will fail. The
 path to `test-child` can be found through `dirname(argv[0])/../test-
 child`, but unit tests don't have access to `argv[0]`. Therefore one
 solution is to use autoconf to find the Tor build directory and base the
 path on this.

 Originally reported by Sebastian Hahn.

--

Comment(by sjmurdoch):

 Believed fixed in 06eafb3 of git://git.torproject.org/sjm217/tor.git (fix-
 test-child branch).

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


More information about the tor-bugs mailing list