summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_signal.py
Commit message (Collapse)AuthorAgeFilesLines
* Merged revisions 86596 via svnmerge fromEzio Melotti2010-11-211-6/+6
| | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/branches/py3k ........ r86596 | ezio.melotti | 2010-11-20 21:04:17 +0200 (Sat, 20 Nov 2010) | 1 line #9424: Replace deprecated assert* methods in the Python test suite. ........
* Merged revisions 85586-85587,85596-85598 via svnmerge fromGregory P. Smith2010-10-171-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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. ........
* Merged revisions 85140 via svnmerge fromBrian Curtin2010-10-011-6/+6
| | | | | | | | | | | | 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. ........
* Merged revisions 84556 via svnmerge fromBrian Curtin2010-09-061-3/+2
| | | | | | | | | | | | | | 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. ........
* Merged revisions 83771 via svnmerge fromBrian Curtin2010-08-071-6/+6
| | | | | | | | | | | 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. ........
* Merge of r83763 introduced 'support' into test_signal; should be 'test_support'Mark Dickinson2010-08-061-2/+2
|
* Merged revisions 83763 via svnmerge fromBrian Curtin2010-08-061-5/+28
| | | | | | | | | | | 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. ........
* use TestCase skip methodBenjamin Peterson2010-05-151-4/+4
|
* If the timeout is exceeded, count the tests as skipped instead of justStefan Krah2010-05-151-6/+4
| | | | issuing a warning.
* Skip signal handler re-installation if it is not necessary. Issue 8354.Jean-Paul Calderone2010-05-081-18/+75
|
* 1) The timeout in the itimer tests was too low for slow or heavilyStefan Krah2010-04-201-11/+13
| | | | | | | | 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.
* Issue #3864: Skip three test_signal tests on freebsd6 due to platform bug.R. David Murray2010-04-171-0/+10
| | | | | | | 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.
* Add extra information to a test_signal failure message to aid diagnosis of ↵Mark Dickinson2009-11-091-1/+3
| | | | buildbot failure.
* Issue #7042: Use a better mechanism for testing timers in test_signal.Mark Dickinson2009-10-311-2/+10
|
* Issue #7042: Fix test_signal failure on OS X 10.6 64-bit buildsMark Dickinson2009-10-041-0/+2
| | | | | (and also, with luck, on the x86 FreeBSD buildbot), by making sure that some user time is used in test_itimer_virtual.
* convert usage of fail* to assert*Benjamin Peterson2009-06-301-3/+3
|
* #6276: Remove usage of nested() in favor of new with statement with multiple ↵Georg Brandl2009-06-181-3/+3
| | | | managers.
* remove test_support.TestSkipped and just use unittest.SkipTestBenjamin Peterson2009-03-261-1/+1
|
* Add enough debugging information to diagnose failures where theJeffrey Yasskin2008-04-061-5/+14
| | | | | | | | HandlerBException is ignored, and fix one such problem, where it was thrown during the __del__ method of the previous Popen object. We may want to find a better way of printing verbose information so it's not spammy when the test passes.
* Oops again. EINTR is in errno, not signal.Jeffrey Yasskin2008-04-041-1/+1
|
* Doh! os.read() raises an OSError, not an IOError when it's interrupted.Jeffrey Yasskin2008-04-041-2/+5
| | | | | And fix some flakiness in test_itimer_prof, which could detect that the timer had reached 0 before the signal arrived announcing that fact.
* Try to make test_signal less flaky. I still see some flakiness inJeffrey Yasskin2008-04-021-6/+24
| | | | test_itimer_prof.
* Try to get this test to be more stable:Neal Norwitz2008-03-251-4/+15
| | | | | | | | * disable gc during the test run because we are spawning objects and there was an exception when calling Popen.__del__ * Always set an alarm handler so the process doesn't exit if the test fails (should probably add assertions on the value of hndl_called in more places) * Using a negative time causes Linux to treat it as zero, so disable that test.
* Patch #2240: Implement signal.setitimer and signal.getitimer.Martin v. Löwis2008-03-241-1/+85
|
* Try to fix test_signal on FreeBSD. I'm assuming that os.kill is failing toJeffrey Yasskin2008-03-211-19/+7
| | | | raise a signal, but switching to subprocess makes the code cleaner anyway.
* Try to fix test_signal breakages on Linux due to r61687. It appears that atJeffrey Yasskin2008-03-211-2/+4
| | | | | | least two of the linux build bots aren't leaving zombie processes around for os.waitpid to wait for, causing ECHILD errors. This would be a symptom of a bug somewhere, but probably not in signal itself.
* Speed up test_signal from ~24s to 4s by avoiding nearly all of the sleep calls.Jeffrey Yasskin2008-03-211-121/+129
|
* Windows fix for signal test - skip it earlierChristian Heimes2008-02-281-5/+6
|
* Issue 1089358. Adds the siginterrupt() function, that is just aFacundo Batista2008-02-231-2/+46
| | | | | | wrapper around the system call with the same name. Also added test cases, doc changes and NEWS entry. Thanks Jason and Ralf Schmitt.
* Patch #1583 by Adam Olsen.Guido van Rossum2007-12-191-1/+48
| | | | | | | This adds signal.set_wakeup_fd(fd) which sets a file descriptor to which a zero byte will be written whenever a C exception handler runs. I added a simple C API as well, PySignal_SetWakeupFd(fd).
* Patch #1008: port test_signal to unittest.Georg Brandl2007-08-241-161/+171
|
* Ah, fudge. One of the prints here actually "shouldn't be"Tim Peters2006-08-121-2/+1
| | | | | | | | | protected by "if verbose:", which caused the test to fail on all non-Windows boxes. Note that I deliberately didn't convert this to unittest yet, because I expect it would be even harder to debug this on Tru64 after conversion.
* test_signal: Signal handling on the Tru64 buildbotTim Peters2006-08-121-64/+84
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | appears to be utterly insane. Plug some theoretical insecurities in the test script: - Verify that the SIGALRM handler was actually installed. - Don't call alarm() before the handler is installed. - Move everything that can fail inside the try/finally, so the test cleans up after itself more often. - Try sending all the expected signals in force_test_exit(), not just SIGALRM. Since that was fixed to actually send SIGALRM (instead of invisibly dying with an AttributeError), we've seen that sending SIGALRM alone does not stop this from hanging. - Move the "kill the child" business into the finally clause, so the child doesn't survive test failure to send SIGALRM to other tests later (there are also baffling SIGALRM-related failures in test_socket). - Cancel the alarm in the finally clause -- if the test dies early, we again don't want SIGALRM showing up to confuse a later test. Alas, this still relies on timing luck wrt the spawned script that sends the test signals, but it's hard to see how waiting for seconds can so often be so unlucky. test_threadedsignals: curiously, this test never fails on Tru64, but doesn't normally signal SIGALRM. Anyway, fixed an obvious (but probably inconsequential) logic error.
* force_test_exit(): This has been completely ineffectiveTim Peters2006-08-111-1/+5
| | | | | | | at stopping test_signal from hanging forever on the Tru64 buildbot. That could be because there's no such thing as signal.SIGALARM. Changed to the idiotic (but standard) signal.SIGALRM instead, and added some more debug output.
* Let us know when there was a problem and the child had to kill the parentNeal Norwitz2006-08-021-0/+1
|
* Try to prevent hangs on Tru64/Alpha buildbot. I'm not certain this will helpNeal Norwitz2006-07-301-1/+37
| | | | and may need to be reverted if it causes problems.
* Verify that the signal handlers were really calledNeal Norwitz2006-07-301-0/+12
|
* Test getsignal() and some error conditionsNeal Norwitz2006-01-231-1/+23
|
* Let's not use string exceptions any more.Armin Rigo2004-08-071-1/+2
|
* lightly modified version of my patchMichael W. Hudson2004-06-111-24/+31
| | | | | | [ 971323 ] make test_signal less annoying after some comments on IRC from a highly opinionated australian who wishes to remain anonymous.
* Whitespace normalization.Tim Peters2003-04-241-1/+0
|
* Take out my (long since disabled) POSIX signal mask handling code.Michael W. Hudson2003-03-131-61/+0
| | | | | I'm not going to have the time or energy to get this working x-platform -- anyone who does is welcome to the code!
* Get rid of relative imports in all unittests. Now anything thatBarry Warsaw2002-07-231-1/+1
| | | | | | | | | | | imports e.g. test_support must do so using an absolute package name such as "import test.test_support" or "from test import test_support". This also updates the README in Lib/test, and gets rid of the duplicate data dirctory in Lib/test/data (replaced by Lib/email/test/data). Now Tim and Jack can have at it. :)
* Whitespace normalization.Tim Peters2002-07-161-1/+0
|
* This is patchMichael W. Hudson2002-05-271-3/+65
| | | | | | | [ 559250 ] more POSIX signal stuff Adds support (and docs and tests and autoconfery) for posix signal mask handling -- sigpending, sigprocmask and sigsuspend.
* SF patch #474590 -- RISC OS supportGuido van Rossum2001-10-241-2/+2
|
* a bold attempt to fix things broken by MAL's verify patch: importFredrik Lundh2001-01-171-1/+1
| | | | 'verify' iff it's used by a test module...
* This patch removes all uses of "assert" in the regression test suiteMarc-André Lemburg2001-01-171-1/+1
| | | | | | | and replaces them with a new API verify(). As a result the regression suite will also perform its tests in optimization mode. Written by Marc-Andre Lemburg. Copyright assigned to Guido van Rossum.
* Make reindent.py happy (convert everything to 4-space indents!).Fred Drake2000-10-231-31/+31
|
* Raise 'TestSkipped' (from the test_support) module rather than 'ImportError'Thomas Wouters2000-08-041-2/+2
| | | | | to signify a test that should be marked as 'skipped' rather than 'failed'. Also 'document' it, in README.