[tor-commits] [stem/master] Skipping proc tests broken by tor's disabledebugger features

atagar at torproject.org atagar at torproject.org
Sun Jul 8 03:26:42 UTC 2012


commit 74597a78159acf20146c72d0392e74f07d2bf9e3
Author: Damian Johnson <atagar at torproject.org>
Date:   Sat Jul 7 20:23:27 2012 -0700

    Skipping proc tests broken by tor's disabledebugger features
    
    Stem's proc integ tests exercise that utility by running it against our tor
    instance. However, as discussed in ticket #3313 the DisableDebuggerAttachment
    feature screws up our proc permissions. Skipping those tests if they would fail
    due to this.
    
    Caught by Ravi in...
    https://trac.torproject.org/6286
---
 test/integ/util/proc.py |    6 ++++++
 test/runner.py          |    2 +-
 2 files changed, 7 insertions(+), 1 deletions(-)

diff --git a/test/integ/util/proc.py b/test/integ/util/proc.py
index 502d13f..d7ef317 100644
--- a/test/integ/util/proc.py
+++ b/test/integ/util/proc.py
@@ -20,6 +20,9 @@ class TestProc(unittest.TestCase):
     if not proc.is_available():
       test.runner.skip(self, "(proc unavailable)")
       return
+    elif not test.runner.get_runner().is_ptraceable():
+      test.runner.skip(self, "(DisableDebuggerAttachment is set)")
+      return
     
     runner = test.runner.get_runner()
     runner_pid, tor_cwd = runner.get_pid(), runner.get_tor_cwd()
@@ -84,6 +87,9 @@ class TestProc(unittest.TestCase):
     elif not test.runner.Torrc.PORT in runner.get_options():
       test.runner.skip(self, "(no control port)")
       return
+    elif not test.runner.get_runner().is_ptraceable():
+      test.runner.skip(self, "(DisableDebuggerAttachment is set)")
+      return
     
     # making a controller connection so that we have something to query for
     with runner.get_tor_socket():
diff --git a/test/runner.py b/test/runner.py
index 3b696b3..d4d3eec 100644
--- a/test/runner.py
+++ b/test/runner.py
@@ -368,7 +368,7 @@ class Runner:
     a lot of adverse side effects
     (`ticket <https://trac.torproject.org/projects/tor/ticket/3313>`_).
     
-    :returns: True if debugger attachment is disallowd, False otherwise
+    :returns: True if debugger attachment is allowd, False otherwise
     """
     
     # If we're running a tor version where ptrace is disabled and we didn't



More information about the tor-commits mailing list