Merged revisions 80144 via svnmerge from

svn+ssh://pythondev@svn.python.org/python/trunk

........
  r80144 | r.david.murray | 2010-04-17 01:26:26 -0400 (Sat, 17 Apr 2010) | 8 lines

  Issue #3864: Skip three test_signal tests on freebsd6 due to platform bug.

  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.
........
This commit is contained in:
R. David Murray 2010-04-21 01:41:41 +00:00
parent dbcf740f3f
commit 12c5fbb1c6
2 changed files with 18 additions and 0 deletions

View File

@ -140,6 +140,11 @@ class InterProcessSignalTests(unittest.TestCase):
" didn't arrive after another second.") " didn't arrive after another second.")
def test_main(self): def test_main(self):
# Issue 3864, unknown if this affects earlier versions of freebsd also
if sys.platform=='freebsd6' and test_support.verbose:
sys.stderr.write('skipping -- inter process signals not reliable '
'(do not mix well with threading) on freebsd6\n')
return
# This function spawns a child process to insulate the main # This function spawns a child process to insulate the main
# test-running process from all the signals. It then # test-running process from all the signals. It then
# communicates with that child process over a pipe and # communicates with that child process over a pipe and
@ -356,6 +361,11 @@ class ItimerTest(unittest.TestCase):
self.assertEqual(self.hndl_called, True) self.assertEqual(self.hndl_called, True)
def test_itimer_virtual(self): def test_itimer_virtual(self):
# Issue 3864, unknown if this affects earlier versions of freebsd also
if sys.platform=='freebsd6' and test_support.verbose:
sys.stderr.write('skipping -- itimer not reliable '
'(does not mix well with threading) on freebsd6\n')
return
self.itimer = signal.ITIMER_VIRTUAL self.itimer = signal.ITIMER_VIRTUAL
signal.signal(signal.SIGVTALRM, self.sig_vtalrm) signal.signal(signal.SIGVTALRM, self.sig_vtalrm)
signal.setitimer(self.itimer, 0.3, 0.2) signal.setitimer(self.itimer, 0.3, 0.2)
@ -377,6 +387,11 @@ class ItimerTest(unittest.TestCase):
self.assertEquals(self.hndl_called, True) self.assertEquals(self.hndl_called, True)
def test_itimer_prof(self): def test_itimer_prof(self):
# Issue 3864, unknown if this affects earlier versions of freebsd also
if sys.platform=='freebsd6' and test_support.verbose:
sys.stderr.write('skipping -- itimer not reliable '
'(does not mix well with threading) on freebsd6\n')
return
self.itimer = signal.ITIMER_PROF self.itimer = signal.ITIMER_PROF
signal.signal(signal.SIGPROF, self.sig_prof) signal.signal(signal.SIGPROF, self.sig_prof)
signal.setitimer(self.itimer, 0.2, 0.2) signal.setitimer(self.itimer, 0.2, 0.2)

View File

@ -93,6 +93,9 @@ Build
Tests 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 #8193: Fix test_zlib failure with zlib 1.2.4. - Issue #8193: Fix test_zlib failure with zlib 1.2.4.