When signals are unblocked, pending signal ared delivered in the reverse order
of their number (also on Linux, not only on FreeBSD 6).
Don't sort signals by their number if signals were not blocked (test_signum).
* Don't create a thread at startup anymore to initialize the pthread library:
it changes the behaviour of many functions related to signal handling like
sigwait()
* Reenable test_sigtimedwait_poll() on FreeBSD 6
Move also the "ready" trigger after the installation of the signal handler and
the call to siginterrupt().
Use a timeout of 5 seconds instead of 3. Two seconds are supposed to be enough,
but some of our buildbots are really slow (especially the FreeBSD 6 VM).
Move also the "ready" trigger after the installation of the signal handler and
the call to siginterrupt().
Use a timeout of 5 seconds instead of 3. Two seconds are supposed to be enough,
but some of our buildbots are really slow (especially the FreeBSD 6 VM).
Backport commits 968b9ff9a059 and aff0a7b0cb12 from the default branch to 3.2
branch. Extract of the changelog messages:
"The previous tests used time.sleep() to synchronize two processes. If the host
was too slow, the test could fail.
The new tests only use one process, but they use a subprocess to:
- have only one thread
- have a timeout on the blocking read (select cannot be used in the test,
select always fail with EINTR, the kernel doesn't restart it)
- not touch signal handling of the parent process"
and
"Add a basic synchronization code between the child and the parent processes:
the child writes "ready" to stdout."
I replaced .communicate(timeout=3.0) by an explicit waiting loop using
Popen.poll().
... instead of using fork(): sig*wait*() functions behave differently (not
correctly) after a fork, especially on FreeBSD 6.
Skip also test_sigtimedwait_poll() on FreeBSD 6 because of a kernel bug.
On FreeBSD6, pthread_kill() doesn't work on the main thread before the creation
of the first thread. Create therefore a dummy thread (no-op) a startup to
initialize the pthread library.
Add also a test for this use case, test written by Charles-François Natali.
The previous tests used time.sleep() to synchronize two processes. If the host
was too slow, the test could fail.
The new tests only use one process, but they use a subprocess to:
- have only one thread
- have a timeout on the blocking read (select cannot be used in the test,
select always fail with EINTR, the kernel doesn't restart it)
- not touch signal handling of the parent process
The _tkinter module loads the Tcl library which creates a thread waiting events
in select(). This thread receives signals blocked by all other threads. We
cannot test blocked signals if the _tkinter module is loaded.
called. The test checks that SIG_UNBLOCK calls immediatly the signal handler of
the pending SIGUSR1. Improve also the tests using an exception (division by
zero) instead of a flag (a function attribute).
and/or change the signal mask of the calling thread.
Fix also tests of test_io using threads and an alarm: use pthread_sigmask() to
ensure that the SIGALRM signal is received by the main thread.
Original patch written by Jean-Paul Calderone.
svn+ssh://pythondev@svn.python.org/python/branches/py3k
........
r85586 | gregory.p.smith | 2010-10-16 17:17:24 -0700 (Sat, 16 Oct 2010) | 2 lines
fix for netbsd.
........
r85587 | gregory.p.smith | 2010-10-16 17:43:10 -0700 (Sat, 16 Oct 2010) | 3 lines
applying netbsd-wizs-mod.patch from issue5510 -
fixes for netbsd (and dragonflybsd?)
........
r85596 | gregory.p.smith | 2010-10-16 19:14:36 -0700 (Sat, 16 Oct 2010) | 6 lines
Fix multiprocessing Semaphore's on netbsd5. SEM_VALUE_MAX is defined
as (~0U) on NetBSD which was causing it to appear as -1 when used as
a signed int for _multprocessing.SemLock.SEM_VALUE_MAX. This works
around the problem by substituting INT_MAX on systems where it appears
negative when used as an int.
........
r85597 | gregory.p.smith | 2010-10-16 19:57:19 -0700 (Sat, 16 Oct 2010) | 2 lines
skip test_itimer_virtual on NetBSD to prevent the test suite from hanging.
........
r85598 | gregory.p.smith | 2010-10-16 20:09:12 -0700 (Sat, 16 Oct 2010) | 2 lines
Avoid hanging the test on netbsd5.
........
svn+ssh://pythondev@svn.python.org/python/branches/py3k
........
r85140 | brian.curtin | 2010-10-01 09:49:24 -0500 (Fri, 01 Oct 2010) | 4 lines
Fix#10003. Add SIGBREAK to the set of valid signals on Windows.
This fixes a regression noticed by bzr, introduced by issue #9324.
........
svn+ssh://pythondev@svn.python.org/python/branches/py3k
........
r84556 | brian.curtin | 2010-09-06 11:04:10 -0500 (Mon, 06 Sep 2010) | 7 lines
Clean up the fix to #9324 with some of the suggestions raised on python-dev
in response to the original checkin.
Move the validation from the original loop into a switch statement,
and adjust a platform check in the tests.
........
svn+ssh://pythondev@svn.python.org/python/branches/py3k
........
r83771 | brian.curtin | 2010-08-06 22:47:21 -0500 (Fri, 06 Aug 2010) | 3 lines
Fix an assertRaises situation and typo. Also pass all tests to run_unittest
rather than do it by platform -- the proper skips are in place already.
........
svn+ssh://pythondev@svn.python.org/python/branches/py3k
........
r83763 | brian.curtin | 2010-08-06 14:27:32 -0500 (Fri, 06 Aug 2010) | 3 lines
Fix#9324: Add parameter validation to signal.signal on Windows in order
to prevent crashes.
........
svn+ssh://pythondev@svn.python.org/python/branches/py3k
................
r81188 | stefan.krah | 2010-05-15 11:41:27 +0200 (Sat, 15 May 2010) | 10 lines
Merged revisions 81185 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk
........
r81185 | stefan.krah | 2010-05-15 11:31:08 +0200 (Sat, 15 May 2010) | 4 lines
If the timeout is exceeded, count the tests as skipped instead of just
issuing a warning.
........
................
svn+ssh://pythondev@svn.python.org/python/branches/py3k
................
r80296 | r.david.murray | 2010-04-20 21:51:57 -0400 (Tue, 20 Apr 2010) | 14 lines
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.
........
................
svn+ssh://pythondev@svn.python.org/python/branches/py3k
................
r80240 | stefan.krah | 2010-04-20 10:13:03 +0200 (Tue, 20 Apr 2010) | 15 lines
Merged revisions 80238 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk
........
r80238 | stefan.krah | 2010-04-20 09:59:10 +0200 (Tue, 20 Apr 2010) | 9 lines
1) The timeout in the itimer tests was too low for slow or heavily
loaded machines.
2) Even with the increased timeout, the OS does not guarantee that
a process will get a certain amount of virtual time in 60s, so
the failure is changed to a diagnostic.
........
................
svn+ssh://pythondev@www.python.org/python/branches/py3k
................
r76185 | mark.dickinson | 2009-11-09 20:08:57 +0000 (Mon, 09 Nov 2009) | 9 lines
Merged revisions 76182 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk
........
r76182 | mark.dickinson | 2009-11-09 19:54:51 +0000 (Mon, 09 Nov 2009) | 1 line
Add extra information to a test_signal failure message to aid diagnosis of buildbot failure.
........
................
svn+ssh://pythondev@www.python.org/python/branches/py3k
................
r75238 | mark.dickinson | 2009-10-04 19:43:54 +0100 (Sun, 04 Oct 2009) | 11 lines
Merged revisions 75236 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk
........
r75236 | mark.dickinson | 2009-10-04 19:38:39 +0100 (Sun, 04 Oct 2009) | 4 lines
Issue #7042: Fix test_signal failure on OS X 10.6 64-bit builds
(and also, with luck, on the x86 FreeBSD buildbot), by making sure
that some user time is used in test_itimer_virtual.
........
................