]> granicus.if.org Git - python/commitdiff
Issue #3864: Skip three test_signal tests on freebsd6 due to platform bug.
authorR. David Murray <rdmurray@bitdance.com>
Sat, 17 Apr 2010 05:26:26 +0000 (05:26 +0000)
committerR. David Murray <rdmurray@bitdance.com>
Sat, 17 Apr 2010 05:26:26 +0000 (05:26 +0000)
Two itimer tests and an interprocess signal test fail on FreeBSD 6 if
any test that starts a thread runs before test_signal.  Since FreeBSD7
does not show this behavior, the bug is most likely a platform bug,
so this patch just skips the failing tests on freebsd6.

Lib/test/test_signal.py
Misc/NEWS

index 466b9b62568efa26ae9ef0f1e825a62c78c0b5ed..23b0553cb8d828c5cbfd4a9c77f2668cb0cc1e46 100644 (file)
@@ -139,6 +139,10 @@ class InterProcessSignalTests(unittest.TestCase):
             self.fail("pause returned of its own accord, and the signal"
                       " didn't arrive after another second.")
 
+    # Unknown if this affects earlier versions of freebsd also
+    @unittest.skipIf(sys.platform=='freebsd6',
+        'inter process signals not reliable (do not mix well with threading) '
+        'on freebsd6')
     def test_main(self):
         # This function spawns a child process to insulate the main
         # test-running process from all the signals. It then
@@ -355,6 +359,9 @@ class ItimerTest(unittest.TestCase):
 
         self.assertEqual(self.hndl_called, True)
 
+    # Unknown if this affects earlier versions of freebsd also
+    @unittest.skipIf(sys.platform=='freebsd6',
+        'itimer not reliable (does not mix well with threading) on freebsd6')
     def test_itimer_virtual(self):
         self.itimer = signal.ITIMER_VIRTUAL
         signal.signal(signal.SIGVTALRM, self.sig_vtalrm)
@@ -376,6 +383,9 @@ class ItimerTest(unittest.TestCase):
         # and the handler should have been called
         self.assertEquals(self.hndl_called, True)
 
+    # Unknown if this affects earlier versions of freebsd also
+    @unittest.skipIf(sys.platform=='freebsd6',
+        'itimer not reliable (does not mix well with threading) on freebsd6')
     def test_itimer_prof(self):
         self.itimer = signal.ITIMER_PROF
         signal.signal(signal.SIGPROF, self.sig_prof)
index b53beab88828885ce81c0a07b26749c34450a63e..9f1cba17adfbea6a25b043c18438db52975de02f 100644 (file)
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -294,6 +294,9 @@ C-API
 Tests
 -----
 
+- Issue #3864: Skip three test_signal tests on freebsd6 because they fail
+  if any thread was previously started, most likely due to a platform bug.
+
 - Issue #8348: Fix test ftp url in test_urllib2net.
 
 - Issue #8204: Fix test_ttk notebook test by forcing focus.