summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_faulthandler.py
Commit message (Collapse)AuthorAgeFilesLines
* bpo-31370: Remove support for threads-less builds (#3385)Antoine Pitrou2017-09-071-8/+2
| | | | | | * Remove Setup.config * Always define WITH_THREAD for compatibility.
* bpo-30557: Fix test_faulthandler (#1969)Victor Stinner2017-06-061-2/+4
| | | | On Windows 8, 8.1 and 10 at least, the exit code is the exception code (no bit is cleared).
* bpo-30557: faulthandler now correctly filters and displays exception codes ↵Steve Dower2017-06-051-0/+26
| | | | | | | | | | on Windows (#1924) * bpo-30557: faulthandler now correctly filters and displays exception codes on Windows * Adds test for non-fatal exceptions. * Adds bpo number to comment.
* bpo-30125: Fix faulthandler.disable() on Windows (#1240)Victor Stinner2017-04-211-0/+12
| | | | | | | | | | | | * bpo-30125: Cleanup faulthandler.c * Use size_t type for iterators * Add { ... } * bpo-30125: Fix faulthandler.disable() on Windows On Windows, faulthandler.disable() now removes the exception handler installed by faulthandler.enable().
* Remove unused imports.Serhiy Storchaka2016-12-161-1/+0
|
* Issue #26934: Fix test_faulthandler on Android where raise() exits with 0,Xavier de Gaye2016-11-131-1/+1
| | | | | with a cosmetic change to add a commit message with the issue number, missing from the previous two commits.
* Fix test_faulthandler on Android where raise() exits with 0Xavier de Gaye2016-11-131-1/+13
|
* Issue 27948: Allow backslashes in the literal string portion of f-strings, ↵Eric V. Smith2016-09-101-2/+2
| | | | but not in the expressions. Also, require expressions to begin and end with literal curly braces.
* #27364: fix "incorrect" uses of escape character in the stdlib.R David Murray2016-09-081-4/+4
| | | | | | | And most of the tools. Patch by Emanual Barry, reviewed by me, Serhiy Storchaka, and Martin Panter.
* Issue 27921: Remove backslash from another f-string. I'll revert this change ↵Eric V. Smith2016-09-031-2/+2
| | | | before beta 2. I also need to look in to why test_tools/test_unparse fails with the files that are now being skipped.
* Issue #26778: Fixed "a/an/and" typos in code comment, documentation and errorSerhiy Storchaka2016-04-171-1/+1
|\ | | | | | | messages.
| * Issue #26778: Fixed "a/an/and" typos in code comment and documentation.Serhiy Storchaka2016-04-171-1/+1
| |
* | faulthandler: only log fatal exceptionsVictor Stinner2016-03-231-1/+1
| | | | | | | | | | | | | | | | Issue #23848, #26622: * faulthandler now only logs fatal Windows exceptions. * write error code as decimal, not as hexadecimal * replace "Windows exception" with "Windows fatal exception"
* | faulthandler: add Windows exception handlerVictor Stinner2016-03-231-13/+49
| | | | | | | | | | | | Issue #23848: On Windows, faulthandler.enable() now also installs an exception handler to dump the traceback of all Python threads on any Windows exception, not only on UNIX signals (SIGSEGV, SIGFPE, SIGABRT).
* | faulthandler now works in non-Python threadsVictor Stinner2016-03-161-12/+24
|/ | | | | | | | | | | Issue #26563: * Add _PyGILState_GetInterpreterStateUnsafe() function: the single PyInterpreterState used by this process' GILState implementation. * Enhance _Py_DumpTracebackThreads() to retrieve the interpreter state from autoInterpreterState in last resort. The function now accepts NULL for interp and current_tstate parameters. * test_faulthandler: fix a ResourceWarning when test is interrupted by CTRL+c
* faulthandler: Test Py_FatalError() with GIL releasedVictor Stinner2016-03-151-0/+8
| | | | Issue #26558.
* Issue #9517: Move script_helper to the support package.Berker Peksag2015-05-061-2/+2
| | | | Patch by Christie Wilson.
* Issue #23566: Skip "fd" tests of test_faulthandler on WindowsVictor Stinner2015-03-131-0/+8
| | | | subprocess doesn't support pass_fds on Windows.
* Issue #23566: enable(), register(), dump_traceback() and dump_traceback_later()Victor Stinner2015-03-121-57/+101
| | | | functions of faulthandler now accept file descriptors. Patch by Wei Wu.
* Only pass -E to the child interpreter if our interpreter was running in thatGregory P. Smith2015-01-231-7/+15
|\ | | | | | | | | | | | | | | | | mode. Explicitly remove the PYTHONFAULTHANDLER environment variable before launching a child interpreter when its presence would impact the test (the reason -E was being used in the first place). This enables running the test in an environment where other Python environment variables must be set in order for things to run (such as using PYTHONHOME to tell an embedded interpreter where it should think it lives).
| * Only pass -E to the child interpreter if our interpreter was running in thatGregory P. Smith2015-01-231-7/+15
| | | | | | | | | | | | | | | | | | | | mode. Explicitly remove the PYTHONFAULTHANDLER environment variable before launching a child interpreter when its presence would impact the test (the reason -E was being used in the first place). This enables running the test in an environment where other Python environment variables must be set in order for things to run (such as using PYTHONHOME to tell an embedded interpreter where it should think it lives).
* | (Merge 3.4) faulthandler: test_gil_released() now uses _sigsegv() instead ofVictor Stinner2014-09-301-2/+2
|\ \ | |/ | | | | | | | | | | _read_null(), because _read_null() cannot be used on AIX. On AIX, reading from NULL is allowed: the first page of memory is a mapped read-only on AIX. _read_null() and _sigabrt() don't accept parameters.
| * faulthandler: test_gil_released() now uses _sigsegv() instead of _read_null(),Victor Stinner2014-09-301-2/+2
| | | | | | | | | | because _read_null() cannot be used on AIX. On AIX, reading from NULL is allowed: the first page of memory is a mapped read-only on AIX.
* | (Merge 3.4) test_faulthandler: fix typoVictor Stinner2014-09-241-1/+1
|\ \ | |/
| * test_faulthandler: fix typoVictor Stinner2014-09-241-1/+1
| |
* | (Merge 3.4) Close #22175: Improve test_faulthandler readability with dedent.Victor Stinner2014-08-101-178/+180
|\ \ | |/ | | | | Patch written by Xavier de Gaye.
| * Close #22175: Improve test_faulthandler readability with dedent.Victor Stinner2014-08-101-174/+176
| | | | | | | | Patch written by Xavier de Gaye.
* | Issue #22018: Add _testcapi.raise_signal()Victor Stinner2014-07-211-8/+18
|/ | | | | | | | - Use _testcapi.raise_signal() in test_signal - close also os.pipe() file descriptors in some test_signal tests where they were not closed properly - Remove faulthandler._sigill() and faulthandler._sigbus(): reuse _testcapi.raise_signal() in test_faulthandler
* Issue #21497: faulthandler functions now raise a better error if sys.stderr isVictor Stinner2014-05-141-0/+25
| | | | | None: RuntimeError("sys.stderr is None") instead of AttributeError("'NoneType' object has no attribute 'fileno'").
* Issue 19306: Add extra hints to faulthandler stack dumps that they are ↵Guido van Rossum2013-10-211-9/+9
| | | | upside down.
* Issue #18948: improve SuppressCoreFiles to include Windows crash popup ↵Antoine Pitrou2013-10-081-20/+4
| | | | | | suppression, and use it in more tests. Patch by Valerie Lambert and Zachary Ware.
* Close #18957: The PYTHONFAULTHANDLER environment variable now only enables theVictor Stinner2013-09-081-7/+23
| | | | | faulthandler module if the variable is non-empty. Same behaviour than other variables like PYTHONDONTWRITEBYTECODE.
* (Merge 3.3) test_faulthandler: skip test_read_null() on AIXVictor Stinner2013-07-031-0/+2
|\ | | | | | | | | | | | | AIX maps the first page of memory at address zero as valid, read-only. Reading NULL is not a fault on AIX. This is utilized by IBM compiler optimizations. One speculatively can indirect through a pointer which may be null without first testing if null and defer the test before using the value.
| * test_faulthandler: skip test_read_null() on AIXVictor Stinner2013-07-031-0/+2
| | | | | | | | | | | | | | AIX maps the first page of memory at address zero as valid, read-only. Reading NULL is not a fault on AIX. This is utilized by IBM compiler optimizations. One speculatively can indirect through a pointer which may be null without first testing if null and defer the test before using the value.
* | Issue #17206: Fix test_cmd_line and test_faulthandler for my previous changeVictor Stinner2013-06-251-3/+5
| | | | | | | | | | (test.regrtest and test.script_helper enable faulthandler module in subprocesses).
* | (Merge 3.3) test_faulthandler: use _sigsegv() instead of _read_null()Victor Stinner2013-06-171-5/+5
|\ \ | |/ | | | | faulthandler._read_null() is not reliable: it does not crash on AIX.
| * test_faulthandler: use _sigsegv() instead of _read_null()Victor Stinner2013-06-171-5/+5
| | | | | | | | faulthandler._read_null() is not reliable: it does not crash on AIX.
* | Update various test modules to use unittest.main() for test discoveryBrett Cannon2013-06-131-4/+1
|/ | | | instead of manually listing tests for test.support.run_unittest().
* Fix indentation.Ezio Melotti2013-03-051-1/+1
|
* #11732: add a new suppress_crash_popup() context manager to test.support.Ezio Melotti2013-03-051-2/+4
|
* Closes #15969: rename new API to have consistent names in the faulthandler ↵Georg Brandl2012-09-221-19/+19
| | | | module.
* Issue #15463: Write a test for faulthandler truncating the name of functionsVictor Stinner2012-08-011-0/+24
| | | | to 500 characters.
* Fix initialization of the faulthandler moduleVictor Stinner2012-07-311-0/+15
| | | | | | | faulthandler requires the importlib if "-X faulthandler" option is present on the command line, so initialize faulthandler after importlib. Add also an unit test.
* Closes #14729: Allowed test to pass on Windows by adjusting the test ↵Vinay Sajip2012-05-061-1/+1
| | | | condition slightly to allow for a Windows-specific error message.
* Issue #12868: Skip test_faulthandler.test_stack_overflow() on OpenBSD:Charles-François Natali2011-09-011-0/+3
| | | | sigaltstack(2) doesn't work when linked with pthread.
* Issue #12700: fix test_faulthandler for Mac OS X LionVictor Stinner2011-08-081-4/+5
| | | | Read from NULL raises SIGILL, not SIGSEGV, on Mac OS X Lion.
* Issue #12550: Add chain optional argument to faulthandler.register()Victor Stinner2011-07-131-3/+28
| | | | Call the previous signal handler if chain is True.
* Issue #12400: test_faulthandler now uses sys.__stderr__Victor Stinner2011-06-291-5/+1
| | | | instead of open(os.devnull, 'w')
* Issue #12400: fix test_faulthandler if regrtest captures sys.stderrVictor Stinner2011-06-291-8/+22
| | | | faulthandler.enable() requires that sys.stderr has a fileno() method.
* test_faulthandler: use a longer sleep (2.5 sec instead of 1.3 sec) inVictor Stinner2011-06-011-6/+7
| | | | _check_dump_tracebacks_later() to avoid failures if the system is slow.