Staging
v0.5.1
https://github.com/python/cpython
Revision 1742f3331fd5c6286e308db6681f9d6abcddb77c authored by Tim Peters on 12 August 2006, 04:42:47 UTC, committed by Tim Peters on 12 August 2006, 04:42:47 UTC
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.
1 parent ebcf875
History
Tip revision: 1742f3331fd5c6286e308db6681f9d6abcddb77c authored by Tim Peters on 12 August 2006, 04:42:47 UTC
test_signal: Signal handling on the Tru64 buildbot
Tip revision: 1742f33
File Mode Size
Demo
Doc
Grammar
Include
Lib
Mac
Misc
Modules
Objects
PC
PCbuild
PCbuild8
Parser
Python
RISCOS
Tools
.hgtags -rw-r--r-- 3.2 KB
LICENSE -rw-r--r-- 13.2 KB
Makefile.pre.in -rw-r--r-- 34.2 KB
README -rw-r--r-- 53.5 KB
configure -rwxr-xr-x 623.0 KB
configure.in -rw-r--r-- 94.0 KB
install-sh -rwxr-xr-x 7.0 KB
pyconfig.h.in -rw-r--r-- 26.4 KB
setup.py -rw-r--r-- 66.3 KB

README

back to top