test.integ.util.proc tests fail (on linux)
A few test.integ.util.proc tests fail on my machine (running Archlinux). I get the following output.
======================================================================
test.integ.util.proc
======================================================================
test_get_connections [FAILURE]
test_get_cwd [FAILURE]
test_get_memory_usage [SUCCESS]
test_get_stats [FAILURE]
test_get_uid [SUCCESS]
======================================================================
ERROR: test_get_connections
----------------------------------------------------------------------
Traceback:
File "/home/neena/code/tors/stem/test/integ/util/proc.py", line 92, in test_get_connections
for conn in proc.get_connections(tor_pid):
File "/home/neena/code/tors/stem/stem/util/proc.py", line 281, in get_connections
for fd in os.listdir("/proc/%s/fd" % pid):
OSError: [Errno 13] Permission denied: '/proc/4291/fd'
======================================================================
ERROR: test_get_cwd
----------------------------------------------------------------------
Traceback:
File "/home/neena/code/tors/stem/test/integ/util/proc.py", line 26, in test_get_cwd
self.assertEquals(tor_cwd, proc.get_cwd(runner_pid))
File "/home/neena/code/tors/stem/stem/util/proc.py", line 141, in get_cwd
raise exc
IOError: unable to read /proc/4291/cwd
======================================================================
ERROR: test_get_stats
----------------------------------------------------------------------
Traceback:
File "/home/neena/code/tors/stem/test/integ/util/proc.py", line 66, in test_get_stats
command, utime, stime, start_time = proc.get_stats(tor_pid, 'command', 'utime', 'stime', 'start time')
File "/home/neena/code/tors/stem/stem/util/proc.py", line 238, in get_stats
raise exc
IOError: stat file had an unexpected format: /proc/4291/stat
----------------------------------------------------------------------
Ran 5 tests in 0.021s
FAILED
I'll post more details after I attempt debugging it.