Commit Graph

14 Commits

Author SHA1 Message Date
Victor Stinner 3ca2b8fd75
bpo-42639: atexit._run_exitfuncs() uses sys.unraisablehook (GH-23779)
atexit._run_exitfuncs() now logs callback exceptions using
sys.unraisablehook, rather than logging them directly into
sys.stderr and raising the last exception.

Run GeneralTest of test_atexit in a subprocess since it calls
atexit._clear() which clears all atexit callbacks.

_PyAtExit_Fini() sets state->callbacks to NULL.
2020-12-15 17:12:02 +01:00
Victor Stinner f7049b5fb6
bpo-42639: Add script_helper.run_test_script() (GH-23777)
* Add run_test_script() function to test.support.script_helper.
* Rename Lib/test/eintrdata/eintr_tester.py to
  Lib/test/_test_eintr.py.
* test_eintr.py uses run_test_script().
2020-12-15 16:08:16 +01:00
Min ho Kim 96e12d5f4f Fix typos in docs, comments and test assert messages (#14872) 2019-07-21 16:12:33 -04:00
Victor Stinner 0644b33821
bpo-35363: test_eintr uses print(flush=True) (GH-10990) 2018-12-06 14:16:21 +01:00
Victor Stinner aa8ae904ad
bpo-35363: test_eintr runs eintr_tester.py in verbose mode (GH-10965)
Moreover, "python3 -m test test_eintr -v" now avoids redirecting
stdout/stderr to a pipe, the child process inherits stdout/stderr
from the parent.
2018-12-06 00:18:30 +01:00
Serhiy Storchaka a6f26c1d34 Remove more unused imports in tests. 2016-04-25 00:05:30 +03:00
Berker Peksag 1e8ee9b380 Issue #23277: Remove unused sys and os imports
Patch by Jon Dufresne.
2016-04-24 07:31:42 +03:00
Victor Stinner 98f223dfa0 Issue #25277: Set a timeout of 10 minutes in test_eintr using faulthandler to
try to debug a hang on the FreeBSD 9 buildbot.

Run also eintr_tester.py with python "-u" command line option to try to get the
full output on hang/crash.
2015-10-01 13:16:43 +02:00
Victor Stinner ff6ee25102 Issue #25122: Remove verbose mode of test_eintr
"./python -m test -W test_eintr" wrote Lib/test/eintrdata/eintr_tester.py
output to stdout which was not expected.

Since test_eintr doesn't hang anymore, remove the verbose mode instead.
2015-09-28 15:04:11 +02:00
Victor Stinner baab5f7341 Issue #25122: Fix test_eintr.test_open() on FreeBSD
Skip test_open() and test_os_open(): both tests uses a FIFO and signals, but
there is a bug in the FreeBSD kernel which blocks the test. Skip the tests
until the bug is fixed in FreeBSD kernel.

Remove also debug traces from test_eintr:

* stop using faulthandler to have a timeout
* remove print()

Write also open and close on two lines in test_open() and test_os_open()
tests. If these tests block again, we can know if the test is stuck at open or
close.

test_eintr: don't always run the test in debug mode.
2015-09-18 11:23:42 +02:00
Victor Stinner 3731bbe8b1 Issue #25122: test_eintr: don't redirect stdout to stderr
sys.stderr is sometimes a StringIO. The redirection was just a hack to see
eintr_tester.py output in red in the buildbot output.
2015-09-15 22:55:52 +02:00
Victor Stinner f11d0d2c0d Issue #25122: try to debug test_eintr hang on FreeBSD
* Add verbose mode to test_eintr
* Always enable verbose mode in test_eintr
* Use faulthandler.dump_traceback_later() with a timeout of 15 minutes in
  eintr_tester.py
2015-09-15 12:15:59 +02:00
Berker Peksag ce643913a9 Issue #9517: Move script_helper to the support package.
Patch by Christie Wilson.
2015-05-06 06:33:17 +03:00
Charles-François Natali 6e6c59b508 Issue #23285: PEP 475 -- Retry system calls failing with EINTR. 2015-02-07 13:27:50 +00:00