Commit Graph

9 Commits

Author SHA1 Message Date
Tim Peters 1742f3331f test_signal: Signal handling on the Tru64 buildbot
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.
2006-08-12 04:42:47 +00:00
Fred Drake db390c1ad8 fix typos, mostly in comments 2005-10-28 14:39:47 +00:00
Tim Peters d1b7827216 Whitespace normalization. 2004-08-07 06:03:09 +00:00
Michael W. Hudson 574a25127a To ever run this test "you must import TestSkipped" from the right
place! (can that please be it for silly mistakes in this file? :-) I
know I started it, but...).

Also, rearrangements to run repeatedly.
2004-08-04 14:22:56 +00:00
Tim Peters 6db15d7307 Whitespace normalization. 2004-08-04 02:36:18 +00:00
Tim Peters 81676dc520 To raise TestSkipped, you must import TestSkipped. 2004-08-04 02:30:45 +00:00
Fred Drake 4818748b87 add missing import! 2004-08-03 16:14:13 +00:00
Michael W. Hudson 34fba3b445 Add the same guard as test_signal. 2004-08-03 15:35:29 +00:00
Michael W. Hudson 43220ea26e Argh! This was meant to be part of patch #960406. 2004-08-03 14:37:14 +00:00