[tor-bugs] #22367 [Core Tor/Stem]: test.integ.process seems to expect a tor binary in $PATH
Tor Bug Tracker & Wiki
blackhole at torproject.org
Wed May 24 19:33:32 UTC 2017
#22367: test.integ.process seems to expect a tor binary in $PATH
-------------------------------+--------------------
Reporter: catalyst | Owner: atagar
Type: defect | Status: new
Priority: Medium | Milestone:
Component: Core Tor/Stem | Version:
Severity: Normal | Keywords:
Actual Points: | Parent ID: #22301
Points: | Reviewer:
Sponsor: |
-------------------------------+--------------------
`test.integ.process` seems to expect to find a system `tor` binary in
`$PATH`. This is probably not intended (and if it is, it should be
clearly documented). This prevents the tests from working on a system
with no `tor` binary in the `$PATH`, which is a configuration I think we
should support.
I tried to create an alternative way to replicate this failure by putting
a shell script called `tor` in a directory by itself at the head of my
`$PATH` that just does a `kill -ABRT $$` but that caused
`test.integ.version.TestVersion` to fail instead (and `test.integ.process`
to succeed, oddly enough). Maybe the only way to reliably replicate this
is by removing (or renaming) the system `tor`.
{{{
tlyu at arcadia:~/src/stem$ ./run_tests.py --tor `pwd`/../tor/src/or/tor
--all --log notice --target RUN_ALL
}}}
produces errors like
{{{
======================================================================
ERROR: test_no_orphaned_process
----------------------------------------------------------------------
Traceback (most recent call last):
File "/home/tlyu/src/stem/test/require.py", line 58, in wrapped
return func(self, *args, **kwargs)
File "/usr/lib/python2.7/dist-packages/mock/mock.py", line 1305, in
patched
return func(*args, **keywargs)
File "/home/tlyu/src/stem/test/integ/process.py", line 210, in
test_no_orphaned_process
stem.process.launch_tor()
File "/home/tlyu/src/stem/stem/process.py", line 98, in launch_tor
raise OSError("'%s' isn't available on your system. Maybe it's not in
your PATH?" % tor_cmd)
OSError: 'tor' isn't available on your system. Maybe it's not in your
PATH?
----------------------------------------------------------------------
Ran 21 tests in 0.972s
FAILED (errors=1, skipped=7)
}}}
--
Ticket URL: <https://trac.torproject.org/projects/tor/ticket/22367>
Tor Bug Tracker & Wiki <https://trac.torproject.org/>
The Tor Project: anonymity online
More information about the tor-bugs
mailing list