Rev 3407: Fix #226769 by disabling some strace tests. in http://code.launchpad.net/%7Evila/bzr/226769-selftest-hanging-with-strace

Vincent Ladeuil v.ladeuil+lp at free.fr
Mon May 5 14:07:53 BST 2008


At http://code.launchpad.net/%7Evila/bzr/226769-selftest-hanging-with-strace

------------------------------------------------------------
revno: 3407
revision-id: v.ladeuil+lp at free.fr-20080505130727-trhinzsipvucozdu
parent: pqm at pqm.ubuntu.com-20080505041432-g51fjlrfth74arug
committer: Vincent Ladeuil <v.ladeuil+lp at free.fr>
branch nick: 226769-selftest-hanging-with-strace
timestamp: Mon 2008-05-05 15:07:27 +0200
message:
  Fix #226769 by disabling some strace tests.
  
  * test_strace.py:
  (TestStrace): Disable the tests since they can make selftest hang.
modified:
  NEWS                           NEWS-20050323055033-4e00b5db738777ff
  bzrlib/tests/test_strace.py    test_strace.py-20070323001526-6zquhhw8leb9m6j8-2
-------------- next part --------------
=== modified file 'NEWS'
--- a/NEWS	2008-05-05 02:06:10 +0000
+++ b/NEWS	2008-05-05 13:07:27 +0000
@@ -48,6 +48,9 @@
     * Conversion from non-rich-root to rich-root(-pack) works even when a
       parent revision has a different root id.  (Aaron Bentley, #177874)
 
+    * Disable strace testing until strace is fixed (see bug #103133).
+     (Vincent Ladeuil, #226769)
+
     * Fetching all revisions from a repository does not cause pack collisions.
       (Robert Collins, Aaron Bentley, #212908)
 

=== modified file 'bzrlib/tests/test_strace.py'
--- a/bzrlib/tests/test_strace.py	2007-07-03 09:28:59 +0000
+++ b/bzrlib/tests/test_strace.py	2008-05-05 13:07:27 +0000
@@ -20,11 +20,13 @@
 import errno
 import subprocess
 
+from bzrlib import (
+    tests,
+    )
 from bzrlib.strace import StraceFeature, strace_detailed, StraceResult
-from bzrlib.tests import TestCaseWithTransport
-
-
-class TestStraceFeature(TestCaseWithTransport):
+
+
+class TestStraceFeature(tests.TestCaseWithTransport):
 
     def test_strace_detection(self):
         """Strace is available if its runnable."""
@@ -43,11 +45,17 @@
         self.assertEqual(found_strace, StraceFeature.available())
 
 
-class TestStrace(TestCaseWithTransport):
+class TestStrace(tests.TestCaseWithTransport):
 
     _test_needs_features = [StraceFeature]
 
+    # If the following tests are activated, selftest may hang (see bug
+    # #226769). This is due to strace strange behavior when required to trace
+    # its own parent in the presence of threads (or something like that). One
+    # strace is fixed, we may want to activate these tests again.
+
     def test_strace_callable_is_called(self):
+        raise tests.TestSkipped("bug #103133 needs to be fixed.")
         output = []
         def function(positional, *args, **kwargs):
             output.append((positional, args, kwargs))
@@ -56,6 +64,8 @@
         self.assertEqual([("a", ("b",), {"c":"c"})], output)
 
     def test_strace_callable_result(self):
+        raise tests.TestSkipped("bug #103133 needs to be fixed.")
+
         def function():
             return "foo"
         result, strace_result = strace_detailed(function,[], {},
@@ -65,6 +75,7 @@
 
     def test_strace_result_has_raw_log(self):
         """Checks that a reasonable raw strace log was found by strace."""
+        raise tests.TestSkipped("bug #103133 needs to be fixed.")
         def function():
             self.build_tree(['myfile'])
         unused, result = strace_detailed(function, [], {},



More information about the bazaar-commits mailing list