summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_faulthandler.py
Commit message (Collapse)AuthorAgeFilesLines
* bpo-44466: Faulthandler now detects the GC (GH-26823) (GH-26826)Victor Stinner2021-06-211-14/+53
| | | | | | The faulthandler module now detects if a fatal error occurs during a garbage collector collection (only if all_threads is true). (cherry picked from commit d19163912bfc790283724f05328bd31e4e65003d)
* fix enum and backslash warnings (GH-25861) (GH-25871)Miss Islington (bot)2021-05-041-1/+1
| | | | | | | | | - Enum warning in test_faulthandler - backslash warning in test_ipaddress (cherry picked from commit 652bcd9f9cd2ed89b5fa958f8456556aa43b48cc) Co-authored-by: Ethan Furman <ethan@stoneleaf.us> Co-authored-by: Ethan Furman <ethan@stoneleaf.us>
* bpo-42955: Rename module_names to sys.stdlib_module_names (GH-24332)Victor Stinner2021-01-251-1/+1
| | | | * Rename _Py_module_names to _Py_stdlib_module_names. * Rename Python/module_names.h to Python/stdlib_module_names.h.
* bpo-42955: Add sys.modules_names (GH-24238)Victor Stinner2021-01-251-3/+5
| | | | Add sys.module_names, containing the list of the standard library module names.
* bpo-42923: _Py_DumpExtensionModules() ignores stdlib ext (GH-24254)Victor Stinner2021-01-191-5/+5
|
* bpo-42923: Dump extension modules on fatal error (GH-24207)Victor Stinner2021-01-181-0/+19
| | | | | | | The Py_FatalError() function and the faulthandler module now dump the list of extension modules on a fatal error. Add _Py_DumpExtensionModules() and _PyModule_IsExtension() internal functions.
* bpo-42923: Add Py_FatalError() test in test_capi (GH-24240)Victor Stinner2021-01-181-16/+14
| | | Move faulthandler._fatal_error() to _testcapi.fatal_error().
* bpo-40275: Use new test.support helper submodules in tests (GH-21743)Hai Shi2020-08-061-1/+2
|
* bpo-39882: Py_FatalError() logs the function name (GH-18819)Victor Stinner2020-03-061-1/+6
| | | | | | | | | | | | The Py_FatalError() function is replaced with a macro which logs automatically the name of the current function, unless the Py_LIMITED_API macro is defined. Changes: * Add _Py_FatalErrorFunc() function. * Remove the function name from the message of Py_FatalError() calls which included the function name. * Update tests.
* bpo-38991: Remove test.support.strip_python_stderr() (GH-17490)Victor Stinner2019-12-081-2/+1
| | | | | test.support: run_python_until_end(), assert_python_ok() and assert_python_failure() functions no longer strip whitespaces from stderr.
* bpo-38203: faulthandler.dump_traceback_later() is always available (GH-16249)Victor Stinner2019-09-181-5/+2
| | | | dump_traceback_later() and cancel_dump_traceback_later() functions of the faulthandler module are always available since Python 3.7.
* bpo-38070: Py_FatalError() logs runtime state (GH-16246)Victor Stinner2019-09-171-6/+12
|
* bpo-37933: Fix faulthandler.cancel_dump_traceback_later() (GH-15440)Thomas A Caswell2019-08-291-0/+11
| | | | Fix faulthandler.cancel_dump_traceback_later() call if cancel_dump_traceback_later() was not called previously.
* Remove unused imports in tests (GH-14518)Victor Stinner2019-07-011-1/+0
|
* bpo-35568: add 'raise_signal' function (GH-11335)Vladimir Matveev2019-01-081-6/+4
| | | | | | As in title, expose C `raise` function as `raise_function` in `signal` module. Also drop existing `raise_signal` in `_testcapi` module and replace all usages with new function. https://bugs.python.org/issue35568
* Fix typos in test_faulthandler skipIfs for ubsan. (GH-11386)Gregory P. Smith2018-12-311-4/+4
|
* Cleanup test_faulthandler sanitizer skip logic. (GH-11381)Gregory P. Smith2018-12-311-7/+14
| | | | | | | Also skip the same tests when using the undefined behavior sanitizer as they much with the output. Updates a regex in another test to use multi-line mode so that the ubsan buildbot should pass again rather than also adding a skip to that one.
* bpo-35214: MSan workarounds for socket, time, and test_faulthandler. (GH-11375)Gregory P. Smith2018-12-311-0/+9
| | | | | Add Clang Memory Sanitizer build instrumentation to work around false positives from the socket and time modules as well as skipping a couple test_faulthandler tests.
* bpo-12458: Fix line numbers for multiline expressions. (GH-8774)Serhiy Storchaka2018-09-171-1/+1
|
* Revert "bpo-33671: Add support.MS_WINDOWS and support.MACOS (GH-7800)" (GH-7919)Victor Stinner2018-06-261-7/+8
| | | This reverts commit 8fbbdf0c3107c3052659e166f73990b466eacbb0.
* bpo-33671: Add support.MS_WINDOWS and support.MACOS (GH-7800)Victor Stinner2018-06-221-8/+7
| | | | | | | | * Add support.MS_WINDOWS: True if Python is running on Microsoft Windows. * Add support.MACOS: True if Python is running on Apple macOS. * Replace support.is_android with support.ANDROID * Replace support.is_jython with support.JYTHON * Cleanup code to initialize unix_shell
* bpo-32101: Fix tests for PYTHONDEVMODE=1 (#4821)Victor Stinner2017-12-121-8/+6
| | | | test_asycio: remove also aio_path which was used when asyncio was developed outside the stdlib.
* bpo-32138: Skip on Android test_faulthandler tests that raise SIGSEGV (GH-4604)xdegaye2017-11-291-13/+14
| | | | Remove the test.support.requires_android_level decorator.
* bpo-31701: faulthandler: ignore MSC and COM Windows exception (#3929)Victor Stinner2017-10-091-0/+16
| | | | | | bpo-31701: On Windows, faulthandler.enable() now ignores MSC and COM exceptions.
* 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.