[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[tor-bugs] #22894 [Core Tor/Stem]: run_tests.py fails when no system tor is installed



#22894: run_tests.py fails when no system tor is installed
-------------------------------+--------------------
     Reporter:  catalyst       |      Owner:  atagar
         Type:  defect         |     Status:  new
     Priority:  Medium         |  Milestone:
    Component:  Core Tor/Stem  |    Version:
     Severity:  Normal         |   Keywords:
Actual Points:                 |  Parent ID:
       Points:                 |   Reviewer:
      Sponsor:                 |
-------------------------------+--------------------
 `run_tests.py` seems to once again be failing when there's no system tor
 installed.  Installing a system tor binary causes the test to succeed.
 This might be a regression of #22366, but it seems that this time, running
 the `run_tests.py` from the top of the stem source tree instead of `make
 test-stem` from the top of the tor source tree also fails.

 Again, I think this is a serious problem because attempting to run the
 system tor without intending to can cause the wrong tor binary to run,
 which can cause misleading test results.  (Also we should support running
 stem without a tor binary being installed in the default path.)

 Also, I confirmed that `env -i` doesn't reproduce this problem, possibly
 because of special cases that execute in the absence of a `PATH` variable.
 You have to delete or rename the system tor binary (or possibly otherwise
 remove it from the path).

 I haven't had time to bisect this yet.

 {{{
 ======================================================================
 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 276, 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 22 tests in 0.004s

 FAILED (errors=1)

 Shutting down tor... done

 Style checks require pycodestyle version 1.4.2 or later. Please install it
 from...
   http://pypi.python.org/pypi/pycodestyle

 TESTING FAILED (36 seconds)
   [RUN_NONE] test_no_orphaned_process (test.integ.process.TestProcess) ...
 ERROR
   [RUN_OPEN] test_no_orphaned_process (test.integ.process.TestProcess) ...
 ERROR
   [RUN_PASSWORD] test_no_orphaned_process (test.integ.process.TestProcess)
 ... ERROR
   [RUN_COOKIE] test_no_orphaned_process (test.integ.process.TestProcess)
 ... ERROR
   [RUN_MULTIPLE] test_no_orphaned_process (test.integ.process.TestProcess)
 ... ERROR
   [RUN_SOCKET] test_no_orphaned_process (test.integ.process.TestProcess)
 ... ERROR
   [RUN_SCOOKIE] test_no_orphaned_process (test.integ.process.TestProcess)
 ... ERROR
   [RUN_PTRACE] test_no_orphaned_process (test.integ.process.TestProcess)
 ... ERROR

 You can re-run just these tests with:

   ./run_tests.py --tor ../tor/src/or/tor --all --log notice --target
 RUN_ALL --test test.integ.process
 }}}

--
Ticket URL: <https://trac.torproject.org/projects/tor/ticket/22894>
Tor Bug Tracker & Wiki <https://trac.torproject.org/>
The Tor Project: anonymity online
_______________________________________________
tor-bugs mailing list
tor-bugs@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-bugs